Class: ImageProxyRuby::Image
- Inherits:
-
Object
- Object
- ImageProxyRuby::Image
- Includes:
- Operations::Flip, Operations::Format, Operations::Quality, Operations::RectangleCrop, Operations::Resize, Operations::Rotation, Operations::SmartCrop
- Defined in:
- lib/image_proxy/image.rb
Overview
represent Image with different functionalities
Instance Attribute Summary collapse
-
#operations ⇒ Object
Returns the value of attribute operations.
-
#remote_url ⇒ Object
Returns the value of attribute remote_url.
Instance Method Summary collapse
-
#initialize(remote_url) ⇒ Image
constructor
A new instance of Image.
- #url ⇒ Object (also: #to_s)
Methods included from Operations::Resize
Methods included from Operations::Format
Methods included from Operations::Quality
Methods included from Operations::Flip
#flip_horizontally, #flip_vertically
Methods included from Operations::Rotation
Methods included from Operations::RectangleCrop
Methods included from Operations::SmartCrop
Constructor Details
#initialize(remote_url) ⇒ Image
Returns a new instance of Image.
24 25 26 27 |
# File 'lib/image_proxy/image.rb', line 24 def initialize(remote_url) @remote_url = remote_url @operations = [] end |
Instance Attribute Details
#operations ⇒ Object
Returns the value of attribute operations.
22 23 24 |
# File 'lib/image_proxy/image.rb', line 22 def operations @operations end |
#remote_url ⇒ Object
Returns the value of attribute remote_url.
22 23 24 |
# File 'lib/image_proxy/image.rb', line 22 def remote_url @remote_url end |
Instance Method Details
#url ⇒ Object Also known as: to_s
29 30 31 32 33 |
# File 'lib/image_proxy/image.rb', line 29 def url operations_str = operations.join(',') "#{ImageProxyRuby.configuration.server}#{operations_str}/#{remote_url}" end |