Class: BadgerVision::Client::ImageInformationResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/badger_vision/client.rb

Instance Method Summary collapse

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

#attributesObject



33
34
35
# File 'lib/badger_vision/client.rb', line 33

def attributes
  @response.fetch(:attributes, []).split(",").map(&:strip)
end

#scenesObject



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

#typeObject



37
38
39
# File 'lib/badger_vision/client.rb', line 37

def type
  @response.fetch(:type, nil)
end