Class: Episodic::Platform::Upload
- Inherits:
-
Object
- Object
- Episodic::Platform::Upload
- Defined in:
- lib/episodic/platform/write_methods.rb
Overview
Represents a pending upload. This includes the URL, filename as well as a list of params to be included in the POST.
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(upload) ⇒ Upload
constructor
Constructor.
Constructor Details
#initialize(upload) ⇒ Upload
Constructor
Parameters
- upload<Hash>
-
A hash for an upload element in the response.
434 435 436 437 438 439 440 441 |
# File 'lib/episodic/platform/write_methods.rb', line 434 def initialize(upload) @filename = upload["filename"] @url = upload["url"] @params = {} upload["param"].each do |param| @params[param["name"]] = param["content"] end end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
425 426 427 |
# File 'lib/episodic/platform/write_methods.rb', line 425 def filename @filename end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
425 426 427 |
# File 'lib/episodic/platform/write_methods.rb', line 425 def params @params end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
425 426 427 |
# File 'lib/episodic/platform/write_methods.rb', line 425 def url @url end |