Module: Etheruby::ContractBase::ClassMethods

Defined in:
lib/etheruby/contract_base.rb

Instance Method Summary collapse

Instance Method Details

#contract_method(name, &blk) ⇒ Object



18
19
20
21
22
# File 'lib/etheruby/contract_base.rb', line 18

def contract_method(name, &blk)
  cmd = Etheruby::ContractMethodDSL.new(name)
  cmd.instance_exec &blk if blk
  contract_methods[name] = cmd.validate!
end

#contract_methodsObject



14
15
16
# File 'lib/etheruby/contract_base.rb', line 14

def contract_methods
  @c_methods ||= {}
end