Class: DiningTable::Presenters::Presenter
- Inherits:
-
Object
- Object
- DiningTable::Presenters::Presenter
- Defined in:
- lib/dining-table/presenters/presenter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#table ⇒ Object
Returns the value of attribute table.
-
#view_context ⇒ Object
Returns the value of attribute view_context.
Instance Method Summary collapse
- #connect_to(table) ⇒ Object
- #identifier ⇒ Object
-
#initialize(options = {}) ⇒ Presenter
constructor
A new instance of Presenter.
- #type?(identifier_) ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ Presenter
Returns a new instance of Presenter.
9 10 11 |
# File 'lib/dining-table/presenters/presenter.rb', line 9 def initialize( = {} ) self. = .merge( ) end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
7 8 9 |
# File 'lib/dining-table/presenters/presenter.rb', line 7 def @options end |
#table ⇒ Object
Returns the value of attribute table.
7 8 9 |
# File 'lib/dining-table/presenters/presenter.rb', line 7 def table @table end |
#view_context ⇒ Object
Returns the value of attribute view_context.
7 8 9 |
# File 'lib/dining-table/presenters/presenter.rb', line 7 def view_context @view_context end |
Instance Method Details
#connect_to(table) ⇒ Object
13 14 15 |
# File 'lib/dining-table/presenters/presenter.rb', line 13 def connect_to( table ) self.table = table end |
#identifier ⇒ Object
17 18 19 |
# File 'lib/dining-table/presenters/presenter.rb', line 17 def identifier raise NotImplementedError end |
#type?(identifier_) ⇒ Boolean
21 22 23 |
# File 'lib/dining-table/presenters/presenter.rb', line 21 def type?( identifier_ ) identifier == identifier_ end |