Class: RPicSim::Label
- Inherits:
-
Object
- Object
- RPicSim::Label
- Defined in:
- lib/rpicsim/label.rb
Overview
A very simple class that represents a label in firmware.
Instance Attribute Summary collapse
-
#address ⇒ Integer
readonly
The address/value of the label from the firmware.
-
#name ⇒ Symbol
readonly
The name of the label from the firmware.
Instance Method Summary collapse
-
#to_i ⇒ Integer
Returns the address of the label.
-
#to_s ⇒ String
Returns a nice string representation of the label.
Instance Attribute Details
#address ⇒ Integer (readonly)
The address/value of the label from the firmware.
12 13 14 |
# File 'lib/rpicsim/label.rb', line 12 def address @address end |
#name ⇒ Symbol (readonly)
The name of the label from the firmware.
8 9 10 |
# File 'lib/rpicsim/label.rb', line 8 def name @name end |
Instance Method Details
#to_i ⇒ Integer
Returns the address of the label.
24 25 26 |
# File 'lib/rpicsim/label.rb', line 24 def to_i address end |
#to_s ⇒ String
Returns a nice string representation of the label.
31 32 33 |
# File 'lib/rpicsim/label.rb', line 31 def to_s '<Label %s address=0x%x>' % [name, address] end |