Class: AlchemyApi::Categorization

Inherits:
Base
  • Object
show all
Defined in:
lib/alchemy_api/categorization.rb

Class Method Summary collapse

Methods inherited from Base

check_json_for_errors_and_raise!, get_json

Class Method Details

.get_categorization_handler(response) ⇒ Object



41
42
43
44
45
# File 'lib/alchemy_api/categorization.rb', line 41

def self.get_categorization_handler(response)
  json = get_json(response)
  Category.new(json['url'], json['category'],
               json['score'].to_f)
end