class HaveAPI::Fs::HashWrapper
Public Class Methods
new(client, api, resource, action, data)
click to toggle source
Calls superclass method
# File lib/haveapi/fs/hash_wrapper.rb, line 3 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
Public Instance Methods
[](k)
click to toggle source
# File lib/haveapi/fs/hash_wrapper.rb, line 17 def [](k) @data[k] end
[]=(k, v)
click to toggle source
# File lib/haveapi/fs/hash_wrapper.rb, line 21 def []=(k, v) @data[k] = v end
attributes()
click to toggle source
# File lib/haveapi/fs/hash_wrapper.rb, line 13 def attributes @data end