Sha256: 6a6aec3c7f28b38ee7ae19c353e89051877f066adf5137cbd8b85018c9ee6337
Contents?: true
Size: 464 Bytes
Versions: 3
Compression:
Stored size: 464 Bytes
Contents
module HaveAPI::Fs class HashWrapper < HaveAPI::Client::Resource def initialize(client, api, resource, action, data) super(client, api, resource._name) setup(resource.instance_variable_get('@description')) @data = data @data.each do |k, v| define_singleton_method(k) { v } end end def attributes @data end def [](k) @data[k] end def []=(k, v) @data[k] = v end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
haveapi-fs-0.11.0 | lib/haveapi/fs/hash_wrapper.rb |
haveapi-fs-0.10.0 | lib/haveapi/fs/hash_wrapper.rb |
haveapi-fs-0.9.0 | lib/haveapi/fs/hash_wrapper.rb |