Class: Kitchen::Directions::BakeIndex::V1::Index
- Defined in:
- lib/kitchen/directions/bake_index/v1.rb
Instance Attribute Summary collapse
-
#sections ⇒ Object
readonly
Returns the value of attribute sections.
Instance Method Summary collapse
- #add_term(term) ⇒ Object
-
#initialize ⇒ Index
constructor
A new instance of Index.
Constructor Details
#initialize ⇒ Index
Returns a new instance of Index.
97 98 99 100 |
# File 'lib/kitchen/directions/bake_index/v1.rb', line 97 def initialize @sections = SortedSet.new @sections_by_name = {} end |
Instance Attribute Details
#sections ⇒ Object (readonly)
Returns the value of attribute sections.
95 96 97 |
# File 'lib/kitchen/directions/bake_index/v1.rb', line 95 def sections @sections end |
Instance Method Details
#add_term(term) ⇒ Object
102 103 104 |
# File 'lib/kitchen/directions/bake_index/v1.rb', line 102 def add_term(term) section_named(term.group_by.capitalize).add_term(term) end |