class Web3::Eth::Block

Attributes

raw_data[R]

Public Class Methods

new(block_data) click to toggle source
# File lib/web3ethereum/block.rb, line 10
def initialize block_data
  @raw_data = block_data

  block_data.each do |k, v|
    self.instance_variable_set("@#{k}", v)
    self.class.send(:define_method, k, proc {self.instance_variable_get("@#{k}")})
  end

  @transactions = @transactions.collect {|t|  Web3::Eth::Transaction.new t }

end

Public Instance Methods

block_number() click to toggle source
# File lib/web3ethereum/block.rb, line 26
def block_number
  from_hex number
end
timestamp_time() click to toggle source
# File lib/web3ethereum/block.rb, line 22
def timestamp_time
  Time.at from_hex timestamp
end