Class: RMasm::Register

Inherits:
ExpressionElement show all
Defined in:
lib/rmasm/register.rb

Overview

Register

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



25
26
27
# File 'lib/rmasm/register.rb', line 25

def name
  @name
end

#parentObject (readonly)

Returns the value of attribute parent.



25
26
27
# File 'lib/rmasm/register.rb', line 25

def parent
  @parent
end

#typeObject (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_sObject



33
34
35
# File 'lib/rmasm/register.rb', line 33

def to_s()
  "#{@name}"
end