Class: RMasm::Register
- Inherits:
-
ExpressionElement
- Object
- ExpressionElement
- RMasm::Register
- Defined in:
- lib/rmasm/register.rb
Overview
Register
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type, parent = nil) ⇒ Register
constructor
A new instance of Register.
- #to_s ⇒ Object
Methods included from ExpressionOperations
#*, #+, #-, #/, #check_arg, #coerce
Constructor Details
#initialize(name, type, parent = nil) ⇒ Register
Returns a new instance of Register.
27 28 29 30 31 |
# File 'lib/rmasm/register.rb', line 27 def initialize(name, type, parent=nil) @name = name @type = type @parent = parent end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
25 26 27 |
# File 'lib/rmasm/register.rb', line 25 def name @name end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
25 26 27 |
# File 'lib/rmasm/register.rb', line 25 def parent @parent end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
25 26 27 |
# File 'lib/rmasm/register.rb', line 25 def type @type end |
Instance Method Details
#to_s ⇒ Object
33 34 35 |
# File 'lib/rmasm/register.rb', line 33 def to_s() "#{@name}" end |