Class: TinCanApi::About
- Inherits:
-
Object
- Object
- TinCanApi::About
- Defined in:
- lib/tin_can_api/about.rb
Instance Attribute Summary collapse
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#versions ⇒ Object
Returns the value of attribute versions.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ About
constructor
A new instance of About.
Constructor Details
#initialize(options = {}) ⇒ About
Returns a new instance of About.
6 7 8 9 10 11 12 13 |
# File 'lib/tin_can_api/about.rb', line 6 def initialize(={}) json = .fetch(:json, nil) if json attributes = JSON.parse(json) @versions = attributes['version'] if attributes['version'] @extensions = attributes['extensions'] if attributes['extensions'] end end |
Instance Attribute Details
#extensions ⇒ Object
Returns the value of attribute extensions.
4 5 6 |
# File 'lib/tin_can_api/about.rb', line 4 def extensions @extensions end |
#versions ⇒ Object
Returns the value of attribute versions.
4 5 6 |
# File 'lib/tin_can_api/about.rb', line 4 def versions @versions end |