Class: Bookit::Content::List
- Defined in:
- lib/bookit/content/list.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
Attributes inherited from Generic
Instance Method Summary collapse
-
#initialize(items, options = {}) ⇒ List
constructor
a List could contain text or links.
- #render ⇒ Object
Methods inherited from Generic
Constructor Details
#initialize(items, options = {}) ⇒ List
a List could contain text or links.
7 8 9 10 11 12 |
# File 'lib/bookit/content/list.rb', line 7 def initialize(items, ={}) items.compact! @items = (items.class == Array) ? items : [items] super end |
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
4 5 6 |
# File 'lib/bookit/content/list.rb', line 4 def items @items end |
Instance Method Details
#render ⇒ Object
14 15 16 |
# File 'lib/bookit/content/list.rb', line 14 def render @items end |