Class: GatherContent::Api::File
- Defined in:
- lib/gather_content/api/file.rb
Instance Attribute Summary collapse
-
#file_id ⇒ Object
Returns the value of attribute file_id.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(item_id, file_id, data) ⇒ File
constructor
A new instance of File.
Methods inherited from Base
#fetch, #get, #post, #post_json, #reset
Constructor Details
#initialize(item_id, file_id, data) ⇒ File
Returns a new instance of File.
6 7 8 9 10 11 12 |
# File 'lib/gather_content/api/file.rb', line 6 def initialize(item_id, file_id, data) raise ArgumentError, "item_id is required!" if item_id.nil? raise ArgumentError, "file_id is required!" if file_id.nil? @item_id = item_id @file_id = file_id @data = data end |
Instance Attribute Details
#file_id ⇒ Object
Returns the value of attribute file_id.
4 5 6 |
# File 'lib/gather_content/api/file.rb', line 4 def file_id @file_id end |
Instance Method Details
#[](key) ⇒ Object
14 15 16 |
# File 'lib/gather_content/api/file.rb', line 14 def [](key) @data[key] end |