Class: BadgerVision::Client::ImageInformationResponse
- Inherits:
-
Object
- Object
- BadgerVision::Client::ImageInformationResponse
- Defined in:
- lib/badger_vision/client.rb
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(response) ⇒ ImageInformationResponse
constructor
A new instance of ImageInformationResponse.
- #scenes ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(response) ⇒ ImageInformationResponse
Returns a new instance of ImageInformationResponse.
29 30 31 |
# File 'lib/badger_vision/client.rb', line 29 def initialize(response) @response = response || {} end |
Instance Method Details
#attributes ⇒ Object
33 34 35 |
# File 'lib/badger_vision/client.rb', line 33 def attributes @response.fetch(:attributes, []).split(",").map(&:strip) end |
#scenes ⇒ Object
41 42 43 44 45 |
# File 'lib/badger_vision/client.rb', line 41 def scenes @response.fetch(:scenes, []).split(",").map(&:strip).map do |scene| Scene.new(parse_scene(scene)) end end |
#type ⇒ Object
37 38 39 |
# File 'lib/badger_vision/client.rb', line 37 def type @response.fetch(:type, nil) end |