Exception: NEAR::Error::InvalidBlock

Inherits:
NEAR::Error
  • Object
show all
Defined in:
lib/near/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(block_height = nil) ⇒ InvalidBlock

Returns a new instance of InvalidBlock.



5
6
7
8
9
10
# File 'lib/near/error.rb', line 5

def initialize(block_height = nil)
  @block_height = block_height.to_i if block_height
  super(block_height ?
    "Block height ##{block_height.to_i} does not exist" :
    "Block height does not exist")
end

Instance Attribute Details

#block_heightObject (readonly)

Returns the value of attribute block_height.



12
13
14
# File 'lib/near/error.rb', line 12

def block_height
  @block_height
end