Class: Informatics::View::Tabs::List

Inherits:
Object
  • Object
show all
Defined in:
lib/informatics/lib/informatics/view/tabs/list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_options = {}) ⇒ List


7
8
9
# File 'lib/informatics/lib/informatics/view/tabs/list.rb', line 7

def initialize(_options = {})
  @items = []
end

Instance Attribute Details

#itemsObject

Returns the value of attribute items


5
6
7
# File 'lib/informatics/lib/informatics/view/tabs/list.rb', line 5

def items
  @items
end

Instance Method Details

#add_item(options) ⇒ Object


11
12
13
# File 'lib/informatics/lib/informatics/view/tabs/list.rb', line 11

def add_item(options)
  @items.push Informatics::View::Tabs::Item.new(text: options[:text], link: options[:link])
end