Class: Journal::Sections

Inherits:
Hash
  • Object
show all
Defined in:
lib/journal-cli/sections.rb

Instance Method Summary collapse

Constructor Details

#initialize(sections) ⇒ Sections

Returns a new instance of Sections.



5
6
7
8
9
10
11
# File 'lib/journal-cli/sections.rb', line 5

def initialize(sections)
  sections.each do |sect|
    section = Section.new(sect)
    self[section.key] = section
  end
  super
end