Class: Web3::Eth::Log

Inherits:
Object
  • Object
show all
Defined in:
lib/web3/eth/log.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(log) ⇒ Log

Returns a new instance of Log.



8
9
10
11
12
13
14
15
16
# File 'lib/web3/eth/log.rb', line 8

def initialize log
  @raw_data = log

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

end

Instance Attribute Details

#raw_dataObject (readonly)

Returns the value of attribute raw_data.



6
7
8
# File 'lib/web3/eth/log.rb', line 6

def raw_data
  @raw_data
end

Instance Method Details

#indexed_argsObject



22
23
24
# File 'lib/web3/eth/log.rb', line 22

def indexed_args
  topics[1...topics.size].collect{|x| x[2..65]}
end

#method_hashObject



18
19
20
# File 'lib/web3/eth/log.rb', line 18

def method_hash
  topics.first[2..65]
end