Class: FileDownload
- Defined in:
- lib/wonko_the_sane/wonko_version.rb
Instance Attribute Summary collapse
-
#destination ⇒ Object
Returns the value of attribute destination.
Attributes inherited from Download
#internalUrl, #rules, #sha256, #size, #url
Instance Method Summary collapse
- #from_json(json) ⇒ Object
-
#initialize(url = nil, destination = nil) ⇒ FileDownload
constructor
A new instance of FileDownload.
- #to_json ⇒ Object
Methods inherited from Download
Constructor Details
#initialize(url = nil, destination = nil) ⇒ FileDownload
Returns a new instance of FileDownload.
48 49 50 51 |
# File 'lib/wonko_the_sane/wonko_version.rb', line 48 def initialize(url = nil, destination = nil) @url = url @destination = destination end |
Instance Attribute Details
#destination ⇒ Object
Returns the value of attribute destination.
46 47 48 |
# File 'lib/wonko_the_sane/wonko_version.rb', line 46 def destination @destination end |
Instance Method Details
#from_json(json) ⇒ Object
59 60 61 62 |
# File 'lib/wonko_the_sane/wonko_version.rb', line 59 def from_json(json) super @destination = json[:destination] end |
#to_json ⇒ Object
53 54 55 56 57 |
# File 'lib/wonko_the_sane/wonko_version.rb', line 53 def to_json obj = super obj[:destination] = @destination obj end |