Class: ShortPixel::ReducerResource
- Defined in:
- lib/shortpixel/resources/reducer.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
Constructor Details
This class inherits a constructor from ShortPixel::Resource
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'lib/shortpixel/resources/reducer.rb', line 4 def params @params end |
Instance Method Details
#call(**params) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/shortpixel/resources/reducer.rb', line 6 def call(**params) @params = params response = post_request('reducer.php', @params) body = extract_body(response) Reducer.new(body) end |
#recall ⇒ Object
13 14 15 |
# File 'lib/shortpixel/resources/reducer.rb', line 13 def recall call(**params) end |