Class: DetectLanguage::Client
- Inherits:
-
Object
- Object
- DetectLanguage::Client
- Defined in:
- lib/detect_language/client.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
Instance Method Summary collapse
- #get(method, params = {}) ⇒ Object
-
#initialize(configuration) ⇒ Client
constructor
A new instance of Client.
- #post(method, params = {}) ⇒ Object
Constructor Details
#initialize(configuration) ⇒ Client
Returns a new instance of Client.
10 11 12 |
# File 'lib/detect_language/client.rb', line 10 def initialize(configuration) @configuration = configuration end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
8 9 10 |
# File 'lib/detect_language/client.rb', line 8 def configuration @configuration end |
Instance Method Details
#get(method, params = {}) ⇒ Object
18 19 20 |
# File 'lib/detect_language/client.rb', line 18 def get(method, params = {}) execute(method, params, :http_method => Net::HTTP::Get) end |
#post(method, params = {}) ⇒ Object
14 15 16 |
# File 'lib/detect_language/client.rb', line 14 def post(method, params = {}) execute(method, params, :http_method => Net::HTTP::Post) end |