Class: RMasm::SectionManager
Instance Attribute Summary collapse
-
#sections ⇒ Object
readonly
Returns the value of attribute sections.
Instance Method Summary collapse
- #get_or_set(section) ⇒ Object
-
#initialize ⇒ SectionManager
constructor
A new instance of SectionManager.
Constructor Details
#initialize ⇒ SectionManager
Returns a new instance of SectionManager.
26 27 28 |
# File 'lib/rmasm/section.rb', line 26 def initialize() @sections = {} end |
Instance Attribute Details
#sections ⇒ Object (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 |