Class: Udb::Instruction::Opcode

Inherits:
Udb::InstructionSubtype::Opcode show all
Extended by:
T::Sig
Defined in:
lib/udb/obj/instruction.rb

Instance Attribute Summary collapse

Attributes inherited from Udb::InstructionSubtype::Opcode

#name, #range

Instance Method Summary collapse

Methods inherited from Udb::InstructionSubtype::Opcode

#overlaps?

Constructor Details

#initialize(name, range, value) ⇒ Opcode

Returns a new instance of Opcode.



178
179
180
181
# File 'lib/udb/obj/instruction.rb', line 178

def initialize(name, range, value)
  super(name, range)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



175
176
177
# File 'lib/udb/obj/instruction.rb', line 175

def value
  @value
end

Instance Method Details

#opcode?Boolean

Returns:

  • (Boolean)


184
# File 'lib/udb/obj/instruction.rb', line 184

def opcode? = true

#to_sObject



187
# File 'lib/udb/obj/instruction.rb', line 187

def to_s = "#{name}[#{range}]"