Class: Nem::Endpoint::Chain

Inherits:
Base
  • Object
show all
Defined in:
lib/nem/endpoint/chain.rb

Instance Method Summary collapse

Methods inherited from Base

#current_node, #initialize, #next_node!, #request, #request!

Constructor Details

This class inherits a constructor from Nem::Endpoint::Base

Instance Method Details

#heightNumeric



12
13
14
# File 'lib/nem/endpoint/chain.rb', line 12

def height
  request!(:get, '/chain/height')[:height]
end

#last_blockNem::Model::Block



6
7
8
# File 'lib/nem/endpoint/chain.rb', line 6

def last_block
  Nem::Model::Block.new_from_block request!(:get, '/chain/last-block')
end

#scoreString



18
19
20
# File 'lib/nem/endpoint/chain.rb', line 18

def score
  request!(:get, '/chain/score')[:score]
end