Class: HaveAPI::Fs::HashListWrapper
- Inherits:
-
Array
- Object
- Array
- HaveAPI::Fs::HashListWrapper
- Defined in:
- lib/haveapi/fs/hash_list_wrapper.rb
Instance Method Summary collapse
- #[](k) ⇒ Object
- #[]=(k, v) ⇒ Object
- #id ⇒ Object
-
#initialize(client, api, resource, action, data) ⇒ HashListWrapper
constructor
A new instance of HashListWrapper.
Constructor Details
#initialize(client, api, resource, action, data) ⇒ HashListWrapper
Returns a new instance of HashListWrapper.
3 4 5 6 7 |
# File 'lib/haveapi/fs/hash_list_wrapper.rb', line 3 def initialize(client, api, resource, action, data) data.each do |v| self << HashWrapper.new(client, api, resource, action, v) end end |
Instance Method Details
#[](k) ⇒ Object
13 14 15 |
# File 'lib/haveapi/fs/hash_list_wrapper.rb', line 13 def [](k) @data[k] end |
#[]=(k, v) ⇒ Object
17 18 19 |
# File 'lib/haveapi/fs/hash_list_wrapper.rb', line 17 def []=(k, v) @data[k] = v end |
#id ⇒ Object
9 10 11 |
# File 'lib/haveapi/fs/hash_list_wrapper.rb', line 9 def id @data[:id] end |