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

Instance Method Summary collapse

Constructor Details

#initialize(name, range, value)

Parameters:

  • name (String)
  • range (Range)
  • value (Integer)


167
168
169
170
# File 'lib/udb/obj/instruction.rb', line 167

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

Instance Attribute Details

#valueInteger (readonly)

Returns:

  • (Integer)


164
165
166
# File 'lib/udb/obj/instruction.rb', line 164

def value
  @value
end

Instance Method Details

#opcode?Boolean

Returns:

  • (Boolean)


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

def opcode? = true

#to_sString

Returns:

  • (String)


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

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