Class: CognitiveVision::Category

Inherits:
Object
  • Object
show all
Defined in:
lib/cognitive_vision/category.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Category

Returns a new instance of Category.



5
6
7
8
# File 'lib/cognitive_vision/category.rb', line 5

def initialize(options = {})
  @name   = options.fetch(:name)
  @score  = options.fetch(:score)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/cognitive_vision/category.rb', line 3

def name
  @name
end

#scoreObject (readonly)

Returns the value of attribute score.



3
4
5
# File 'lib/cognitive_vision/category.rb', line 3

def score
  @score
end