Sha256: 628e33cd3c6e5069b6ef37d718bec5a4c4aaa043f94e52114cf7a499da1e4d8e

Contents?: true

Size: 345 Bytes

Versions: 3

Compression:

Stored size: 345 Bytes

Contents

module HaveAPI::Fs
  class HashListWrapper < Array
    def initialize(client, api, resource, action, data)
      data.each do |v|
        self << HashWrapper.new(client, api, resource, action, v)
      end
    end

    def id
      @data[:id]
    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_list_wrapper.rb
haveapi-fs-0.10.0 lib/haveapi/fs/hash_list_wrapper.rb
haveapi-fs-0.9.0 lib/haveapi/fs/hash_list_wrapper.rb