Class: Retab::FileLink
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::FileLink
- Defined in:
- lib/retab/files/file_link.rb
Constant Summary collapse
- HASH_ATTRS =
{ download_url: :download_url, expires_in: :expires_in, filename: :filename, mime_data: :mime_data }.freeze
Instance Attribute Summary collapse
-
#download_url ⇒ Object
Returns the value of attribute download_url.
-
#expires_in ⇒ Object
Returns the value of attribute expires_in.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#mime_data ⇒ Object
Returns the value of attribute mime_data.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ FileLink
constructor
A new instance of FileLink.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ FileLink
Returns a new instance of FileLink.
21 22 23 24 25 26 27 |
# File 'lib/retab/files/file_link.rb', line 21 def initialize(json) hash = self.class.normalize(json) @download_url = hash[:download_url] @expires_in = hash[:expires_in] @filename = hash[:filename] @mime_data = hash[:mime_data] ? Retab::MimeData.new(hash[:mime_data]) : nil end |
Instance Attribute Details
#download_url ⇒ Object
Returns the value of attribute download_url.
15 16 17 |
# File 'lib/retab/files/file_link.rb', line 15 def download_url @download_url end |
#expires_in ⇒ Object
Returns the value of attribute expires_in.
15 16 17 |
# File 'lib/retab/files/file_link.rb', line 15 def expires_in @expires_in end |
#filename ⇒ Object
Returns the value of attribute filename.
15 16 17 |
# File 'lib/retab/files/file_link.rb', line 15 def filename @filename end |
#mime_data ⇒ Object
Returns the value of attribute mime_data.
15 16 17 |
# File 'lib/retab/files/file_link.rb', line 15 def mime_data @mime_data end |