Class: NSISam::Response
- Inherits:
-
Object
- Object
- NSISam::Response
- Defined in:
- lib/nsisam/response.rb
Instance Attribute Summary collapse
-
#checksum ⇒ String
The checksum of the stored data/file.
-
#data ⇒ Hash, ...
The stored object.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#key ⇒ String
The key of the stored data/file.
Instance Method Summary collapse
-
#deleted? ⇒ Boolean
Check if some data was deleted sucessfully.
-
#initialize(hash) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(hash) ⇒ Response
Returns a new instance of Response.
6 7 8 9 |
# File 'lib/nsisam/response.rb', line 6 def initialize(hash) @key, @checksum, @data, @deleted, @filename, @file = hash.values_at( 'key', 'checksum', 'data', 'deleted', 'filename', 'file') end |
Instance Attribute Details
#checksum ⇒ String
The checksum of the stored data/file
5 6 7 |
# File 'lib/nsisam/response.rb', line 5 def checksum @checksum end |
#data ⇒ Hash, ...
The stored object
5 6 7 |
# File 'lib/nsisam/response.rb', line 5 def data @data end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
11 12 13 |
# File 'lib/nsisam/response.rb', line 11 def file @file end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
11 12 13 |
# File 'lib/nsisam/response.rb', line 11 def filename @filename end |
#key ⇒ String
The key of the stored data/file
5 6 7 |
# File 'lib/nsisam/response.rb', line 5 def key @key end |
Instance Method Details
#deleted? ⇒ Boolean
Check if some data was deleted sucessfully
17 18 19 |
# File 'lib/nsisam/response.rb', line 17 def deleted? !!@deleted end |