Class: Ragweed::Rasm::Immed

Inherits:
Object show all
Defined in:
lib/ragweed/rasm/isa.rb

Overview

An immediate value. Basically just a Fixnum with a type wrapper.

Direct Known Subclasses

Label

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(i) ⇒ Immed

Returns a new instance of Immed.



215
# File 'lib/ragweed/rasm/isa.rb', line 215

def initialize(i); @val = i; end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args) ⇒ Object



216
# File 'lib/ragweed/rasm/isa.rb', line 216

def method_missing(meth, *args); @val.send meth, *args; end

Instance Attribute Details

#valObject (readonly)

Returns the value of attribute val.



214
215
216
# File 'lib/ragweed/rasm/isa.rb', line 214

def val
  @val
end