Class: RMasm::SectionManager

Inherits:
Object
  • Object
show all
Defined in:
lib/rmasm/section.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSectionManager

Returns a new instance of SectionManager.



26
27
28
# File 'lib/rmasm/section.rb', line 26

def initialize()
  @sections = {}
end

Instance Attribute Details

#sectionsObject (readonly)

Returns the value of attribute sections.



24
25
26
# File 'lib/rmasm/section.rb', line 24

def sections
  @sections
end

Instance Method Details

#get_or_set(section) ⇒ Object



30
31
32
33
34
35
# File 'lib/rmasm/section.rb', line 30

def get_or_set(section)
  if (@sections.has_key?(section.name))
    return @sections[section.name]
  end
  @sections[section.name] = section
end