class IDL::GenFile::Content
Public Class Methods
new(sections = {})
click to toggle source
# File lib/ridl/genfile.rb, line 68 def initialize(sections = {}) # copy content map transforming all keys to symbols @sections = sections.inject({}) { |m, (k, v)| m[k.to_sym] = v m } end
Public Instance Methods
[](sectionid)
click to toggle source
# File lib/ridl/genfile.rb, line 82 def [](sectionid) @sections[(sectionid || '').to_sym] end
each(&block)
click to toggle source
# File lib/ridl/genfile.rb, line 86 def each(&block) @sections.each(&block) end
has_section?(sectionid)
click to toggle source
# File lib/ridl/genfile.rb, line 78 def has_section?(sectionid) @sections.has_key?((sectionid || '').to_sym) end
sections()
click to toggle source
# File lib/ridl/genfile.rb, line 74 def sections @sections.keys end