Class: Rips::Formats::CFormat
- Defined in:
- lib/rips/formats/cformat.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Attributes inherited from Format
Instance Method Summary collapse
-
#initialize(opcode) ⇒ CFormat
constructor
@args: all instruction’s arguments.
-
#set_arguments(args) ⇒ Object
Pass all arguments at once.
Constructor Details
#initialize(opcode) ⇒ CFormat
@args: all instruction’s arguments
11 12 13 14 |
# File 'lib/rips/formats/cformat.rb', line 11 def initialize (opcode) super(opcode,2) @args = {} end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
8 9 10 |
# File 'lib/rips/formats/cformat.rb', line 8 def args @args end |
Instance Method Details
#set_arguments(args) ⇒ Object
Pass all arguments at once
17 18 19 |
# File 'lib/rips/formats/cformat.rb', line 17 def set_arguments (args) @args[:r1], @args[:r2] = args[1], args[0] end |