Class: AteTracks::Structures::Response
- Inherits:
-
Object
- Object
- AteTracks::Structures::Response
- Defined in:
- lib/atetracks/structures.rb
Instance Attribute Summary collapse
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#content ⇒ Object
Returns the value of attribute content.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#logged_in ⇒ Object
Returns the value of attribute logged_in.
-
#notices ⇒ Object
Returns the value of attribute notices.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(data, type) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(data, type) ⇒ Response
Returns a new instance of Response.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/atetracks/structures.rb', line 16 def initialize(data, type) class_type = Structures.const_get(type) if class_type @content = class_type.new(data[Helpers.underscore(type)]) @status = data['status'] @errors = data['errors'] @notices = data['notices'] @logged_in = data['logged_in'] @api_version = data['api_version'] end end |
Instance Attribute Details
#api_version ⇒ Object
Returns the value of attribute api_version.
14 15 16 |
# File 'lib/atetracks/structures.rb', line 14 def api_version @api_version end |
#content ⇒ Object
Returns the value of attribute content.
14 15 16 |
# File 'lib/atetracks/structures.rb', line 14 def content @content end |
#errors ⇒ Object
Returns the value of attribute errors.
14 15 16 |
# File 'lib/atetracks/structures.rb', line 14 def errors @errors end |
#logged_in ⇒ Object
Returns the value of attribute logged_in.
14 15 16 |
# File 'lib/atetracks/structures.rb', line 14 def logged_in @logged_in end |
#notices ⇒ Object
Returns the value of attribute notices.
14 15 16 |
# File 'lib/atetracks/structures.rb', line 14 def notices @notices end |
#status ⇒ Object
Returns the value of attribute status.
14 15 16 |
# File 'lib/atetracks/structures.rb', line 14 def status @status end |