Class: BasePresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/base_presenter.rb

Direct Known Subclasses

AttachmentPresenter, CommentPresenter, PostingPresenter, UserNotificationPresenter, UserPresenter

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (BasePresenter) initialize(object, template)

A new instance of BasePresenter



3
4
5
6
# File 'app/presenters/base_presenter.rb', line 3

def initialize(object, template)
  @object     = object
  @template   = template
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(*args, &block) (private)



28
29
30
# File 'app/presenters/base_presenter.rb', line 28

def method_missing(*args, &block)
  @template.send(*args,&block)
end

Instance Attribute Details

- (Object) object (readonly)

Returns the value of attribute object



2
3
4
# File 'app/presenters/base_presenter.rb', line 2

def object
  @object
end