Class: ImageServer::Image
- Inherits:
-
Object
- Object
- ImageServer::Image
- Defined in:
- lib/image_server/image.rb
Instance Method Summary collapse
-
#initialize(namespace, image_hash, protocol: 'http://', domain: nil, size: nil, format: nil, processing: false, object: nil, default_size: nil) ⇒ Image
constructor
A new instance of Image.
- #url(options = {}) ⇒ Object
Constructor Details
#initialize(namespace, image_hash, protocol: 'http://', domain: nil, size: nil, format: nil, processing: false, object: nil, default_size: nil) ⇒ Image
Returns a new instance of Image.
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/image_server/image.rb', line 4 def initialize(namespace, image_hash, protocol: 'http://', domain: nil, size: nil, format: nil, processing: false, object: nil, default_size: nil) @namespace = namespace @image_hash = image_hash @protocol = protocol @domain = domain @size = size @format = format @processing = processing @object = object @default_size = default_size end |
Instance Method Details
#url(options = {}) ⇒ Object
16 17 18 19 |
# File 'lib/image_server/image.rb', line 16 def url( = {}) = .merge({ processing: @processing }) image_url_for_version(@default_size, ) end |