Class: Bookit::Content::List

Inherits:
Generic
  • Object
show all
Defined in:
lib/bookit/content/list.rb

Instance Attribute Summary collapse

Attributes inherited from Generic

#attributes

Instance Method Summary collapse

Methods inherited from Generic

#is_type?, #type

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, options={})
  items.compact!
  @items = (items.class == Array) ? items : [items]

  super options
end

Instance Attribute Details

#itemsObject

Returns the value of attribute items.



4
5
6
# File 'lib/bookit/content/list.rb', line 4

def items
  @items
end

Instance Method Details

#renderObject



14
15
16
# File 'lib/bookit/content/list.rb', line 14

def render
  @items
end