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

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

Overview

rubocop:todo Style/Documentation

Instance Attribute Summary collapse

Instance Method Summary collapse

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(_options = {})
  @items = []
end

Instance Attribute Details

#itemsObject

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(options)
  @items.push Informatics::View::Tabs::Item.new(text: options[:text], link: options[:link])
end