Exception: Elf::Value::OutOfBound

Inherits:
Exception
  • Object
show all
Defined in:
lib/elf/value.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(val) ⇒ OutOfBound

Returns a new instance of OutOfBound.



29
30
31
32
# File 'lib/elf/value.rb', line 29

def initialize(val)
  @val = val
  @appendix = ""
end

Instance Attribute Details

#valObject (readonly)

Returns the value of attribute val.



27
28
29
# File 'lib/elf/value.rb', line 27

def val
  @val
end

Instance Method Details

#append_message(s) ⇒ Object



38
39
40
# File 'lib/elf/value.rb', line 38

def append_message(s)
  @appendix << "\n#{s}"
end

#messageObject



34
35
36
# File 'lib/elf/value.rb', line 34

def message
  "Value #{@val} out of bound#{@appendix}"
end