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.



30
31
32
# File 'lib/badger_vision/client.rb', line 30

def initialize(response)
  @response = response || {}
end

Instance Method Details

#attributesObject



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

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

#scenesObject



42
43
44
45
46
# File 'lib/badger_vision/client.rb', line 42

def scenes
  @response.fetch(:scenes, []).split(",").map(&:strip).map do |scene|
    Scene.new(parse_scene(scene))
  end
end

#typeObject



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

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