Class: Abrupt::Service::Complexity
- Defined in:
- lib/abrupt/service/complexity.rb
Overview
Complexity service documentation see ‘wba.cs.hs-rm.de/AbRUPt/service/complexity/public/index.php/api/v1/complexity’
Constant Summary collapse
- SERVICE_URI =
TODO: outsource service uri to module Service
'http://wba.cs.hs-rm.de/AbRUPt/service/complexity/public/index.php/api/v1/complexity'
Instance Attribute Summary
Attributes inherited from Base
#abbr, #options, #response, #url
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#initialize, keyname, transform_hash
Constructor Details
This class inherits a constructor from Abrupt::Service::Base
Class Method Details
.available_options ⇒ Object
10 11 12 |
# File 'lib/abrupt/service/complexity.rb', line 10 def self. %w(adblock vicram vizweb color contrast ratio) end |
Instance Method Details
#execute ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/abrupt/service/complexity.rb', line 18 def execute super @response['differenceMatrix']['matrix'].flatten! @response['differenceMatrix']['palette'].flatten! @response['contrast']['_1'] = @response['contrast'].delete '1' @response end |
#service_uri ⇒ Object
14 15 16 |
# File 'lib/abrupt/service/complexity.rb', line 14 def service_uri SERVICE_URI end |