Class: Informatics::View::Tabs::List
- Inherits:
-
Object
- Object
- Informatics::View::Tabs::List
- Defined in:
- lib/informatics/lib/informatics/view/tabs/list.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
Instance Method Summary collapse
- #add_item(options) ⇒ Object
-
#initialize(_options = {}) ⇒ List
constructor
A new instance of List.
Constructor Details
#initialize(_options = {}) ⇒ List
Returns a new instance of List.
8 9 10 |
# File 'lib/informatics/lib/informatics/view/tabs/list.rb', line 8 def initialize( = {}) @items = [] end |
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
6 7 8 |
# File 'lib/informatics/lib/informatics/view/tabs/list.rb', line 6 def items @items end |
Instance Method Details
#add_item(options) ⇒ Object
12 13 14 |
# File 'lib/informatics/lib/informatics/view/tabs/list.rb', line 12 def add_item() @items.push Informatics::View::Tabs::Item.new(text: [:text], link: [:link]) end |