Module: Cloudimage::CustomHelpers
- Included in:
- URI
- Defined in:
- lib/cloudimage/custom_helpers.rb
Instance Method Summary collapse
- #positionable_crop(origin_x:, origin_y:, width:, height:) ⇒ Object
- #seal_params(*query_params) ⇒ Object
Instance Method Details
#positionable_crop(origin_x:, origin_y:, width:, height:) ⇒ Object
5 6 7 |
# File 'lib/cloudimage/custom_helpers.rb', line 5 def positionable_crop(origin_x:, origin_y:, width:, height:) tl_px(origin_x, origin_y).br_px(origin_x + width, origin_y + height) end |
#seal_params(*query_params) ⇒ Object
9 10 11 12 13 |
# File 'lib/cloudimage/custom_helpers.rb', line 9 def seal_params(*query_params) # URI#query_values returns hash where keys are strings. sealed_params.merge(query_params.map(&:to_s)) self end |