Class: Abrupt::Service::Readability

Inherits:
Base show all
Defined in:
lib/abrupt/service/readability.rb

Overview

Readability service documentation see ‘wba.cs.hs-rm.de/AbRUPt/service/readability/’

Constant Summary collapse

SERVICE_URI =

TODO: outsource service uri to module Service

'http://wba.cs.hs-rm.de/AbRUPt/service/readability/'

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_optionsObject



10
11
12
# File 'lib/abrupt/service/readability.rb', line 10

def self.available_options
  ['lang']
end

Instance Method Details

#executeObject



18
19
20
21
22
23
# File 'lib/abrupt/service/readability.rb', line 18

def execute
  super
  superfluous_keys = %w(originalText hyphenText)
  @response.delete_if { |key, _value| superfluous_keys.include?(key) }
  @response
end

#service_uriObject



14
15
16
# File 'lib/abrupt/service/readability.rb', line 14

def service_uri
  SERVICE_URI
end