Sha256: 685632fed229bbf434bd58ba3a81e1d242a376accbc32f01f5e7c011566d264f
Contents?: true
Size: 425 Bytes
Versions: 25
Compression:
Stored size: 425 Bytes
Contents
module Etherlite::Railties module Utils def self.load_contracts(_path, prefix: 'Contract') Dir.glob(_path.join('**/*.json')).map do |fullpath| path = Pathname.new fullpath path = path.relative_path_from _path path = path.dirname.join(path.basename(path.extname)).to_s Object.const_set(path.camelize + prefix, Etherlite::Abi.load_contract_at(fullpath)) end end end end
Version data entries
25 entries across 25 versions & 1 rubygems