Class: BestImage::ImageReference
- Inherits:
-
Object
- Object
- BestImage::ImageReference
- Defined in:
- lib/best_image/image_reference.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(url) ⇒ ImageReference
constructor
A new instance of ImageReference.
- #size ⇒ Object
Constructor Details
#initialize(url) ⇒ ImageReference
Returns a new instance of ImageReference.
6 7 8 9 |
# File 'lib/best_image/image_reference.rb', line 6 def initialize(url) @errors = [] @url = url end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
3 4 5 |
# File 'lib/best_image/image_reference.rb', line 3 def errors @errors end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4 5 6 |
# File 'lib/best_image/image_reference.rb', line 4 def url @url end |
Instance Method Details
#<=>(other) ⇒ Object
15 16 17 |
# File 'lib/best_image/image_reference.rb', line 15 def <=>(other) self.size <=> other.size end |
#size ⇒ Object
11 12 13 |
# File 'lib/best_image/image_reference.rb', line 11 def size @size ||= calculate_file_size end |