Class: RMasm::Modifier

Inherits:
Object show all
Defined in:
lib/rmasm/modifier.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ Modifier

Returns a new instance of Modifier.



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

def initialize(type)
  @type = type
  @value = []
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



22
23
24
# File 'lib/rmasm/modifier.rb', line 22

def type
  @type
end

#valueObject

Returns the value of attribute value.



22
23
24
# File 'lib/rmasm/modifier.rb', line 22

def value
  @value
end

Instance Method Details

#<<(arg) ⇒ Object



29
30
31
32
# File 'lib/rmasm/modifier.rb', line 29

def <<(arg)
  @value << arg
  self
end

#[](arg) ⇒ Object



34
35
36
37
# File 'lib/rmasm/modifier.rb', line 34

def [](arg)
  @value << arg
  self
end