Class: Files::Status
- Inherits:
-
Object
- Object
- Files::Status
- Defined in:
- lib/files.com/models/status.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#code ⇒ Object
int64 - Status http code.
- #data ⇒ Object
-
#errors ⇒ Object
array - A list of api errors.
-
#initialize(attributes = {}, options = {}) ⇒ Status
constructor
A new instance of Status.
-
#message ⇒ Object
string - Error message.
-
#status ⇒ Object
string - Status message.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ Status
Returns a new instance of Status.
7 8 9 10 |
# File 'lib/files.com/models/status.rb', line 7 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/status.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/status.rb', line 5 def @options end |
Instance Method Details
#code ⇒ Object
int64 - Status http code
13 14 15 |
# File 'lib/files.com/models/status.rb', line 13 def code @attributes[:code] end |
#data ⇒ Object
27 28 29 |
# File 'lib/files.com/models/status.rb', line 27 def data @attributes[:data] end |
#errors ⇒ Object
array - A list of api errors
32 33 34 |
# File 'lib/files.com/models/status.rb', line 32 def errors @attributes[:errors] end |
#message ⇒ Object
string - Error message
18 19 20 |
# File 'lib/files.com/models/status.rb', line 18 def @attributes[:message] end |
#status ⇒ Object
string - Status message
23 24 25 |
# File 'lib/files.com/models/status.rb', line 23 def status @attributes[:status] end |