Class: Iqvoc::Configuration::Navigation
- Inherits:
-
Object
- Object
- Iqvoc::Configuration::Navigation
- Defined in:
- lib/iqvoc/configuration/navigation.rb
Class Method Summary collapse
- .add(item, position = nil) ⇒ Object
- .add_grouped(item, position = nil) ⇒ Object
- .items ⇒ Object
-
.remove(name) ⇒ Object
removes first item matching name.
Class Method Details
.add(item, position = nil) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/iqvoc/configuration/navigation.rb', line 28 def self.add(item, position = nil) if position items.insert(position, item) else items << item end end |
.add_grouped(item, position = nil) ⇒ Object
42 43 44 45 |
# File 'lib/iqvoc/configuration/navigation.rb', line 42 def self.add_grouped(item, position = nil) index = setup_extension_group(position) items[index][:items] << item end |
.items ⇒ Object
24 25 26 |
# File 'lib/iqvoc/configuration/navigation.rb', line 24 def self.items Iqvoc. end |
.remove(name) ⇒ Object
removes first item matching name
37 38 39 40 |
# File 'lib/iqvoc/configuration/navigation.rb', line 37 def self.remove(name) item = items.find { || [:text] == name} items.delete(item) end |