Class: SmcUtil::Region
- Inherits:
-
Object
- Object
- SmcUtil::Region
- Defined in:
- lib/smcutil/region.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#offset ⇒ Object
Returns the value of attribute offset.
Instance Method Summary collapse
-
#initialize(offset, data) ⇒ Region
constructor
A new instance of Region.
- #to_s ⇒ Object
Constructor Details
#initialize(offset, data) ⇒ Region
Returns a new instance of Region.
5 6 7 8 |
# File 'lib/smcutil/region.rb', line 5 def initialize(offset, data) @offset = offset @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/smcutil/region.rb', line 3 def data @data end |
#offset ⇒ Object
Returns the value of attribute offset.
3 4 5 |
# File 'lib/smcutil/region.rb', line 3 def offset @offset end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/smcutil/region.rb', line 10 def to_s "#{self.offset.to_s(16).upcase} (length #{data.length})" end |