Exception: NEAR::Error::InvalidBlock
- Inherits:
-
NEAR::Error
- Object
- StandardError
- NEAR::Error
- NEAR::Error::InvalidBlock
- Defined in:
- lib/near/error.rb
Instance Attribute Summary collapse
-
#block_height ⇒ Object
readonly
Returns the value of attribute block_height.
Instance Method Summary collapse
-
#initialize(block_height = nil) ⇒ InvalidBlock
constructor
A new instance of InvalidBlock.
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_height ⇒ Object (readonly)
Returns the value of attribute block_height.
12 13 14 |
# File 'lib/near/error.rb', line 12 def block_height @block_height end |