Class: Kitchen::Directions::BakeIndex::V1::Index

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/directions/bake_index/v1.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeIndex

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

#sectionsObject (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