Exception: Trith::Machine::InvalidOperandError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/trith/machine.rb

Overview

# Invalid operand

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (InvalidOperandError) initialize(operand, operator = nil)

A new instance of InvalidOperandError



370
371
372
373
# File 'lib/trith/machine.rb', line 370

def initialize(operand, operator = nil)
  @operand, @operator = operand, operator
  super("invalid operand: #{operand.inspect}")
end

Instance Attribute Details

- (Object) operand (readonly)

Returns the value of attribute operand



367
368
369
# File 'lib/trith/machine.rb', line 367

def operand
  @operand
end

- (Object) operator (readonly)

Returns the value of attribute operator



368
369
370
# File 'lib/trith/machine.rb', line 368

def operator
  @operator
end