Class: ImageMosaic::Image::Child
- Inherits:
-
Object
- Object
- ImageMosaic::Image::Child
- Defined in:
- lib/image_mosaic/image/child.rb
Instance Method Summary collapse
- #height ⇒ Object
-
#initialize(url) ⇒ Child
constructor
A new instance of Child.
- #valid? ⇒ Boolean
- #width ⇒ Object
Constructor Details
#initialize(url) ⇒ Child
Returns a new instance of Child.
4 5 6 |
# File 'lib/image_mosaic/image/child.rb', line 4 def initialize(url) @url = url end |
Instance Method Details
#height ⇒ Object
19 20 21 |
# File 'lib/image_mosaic/image/child.rb', line 19 def height dimensions[1] end |
#valid? ⇒ Boolean
8 9 10 11 12 13 |
# File 'lib/image_mosaic/image/child.rb', line 8 def valid? image true rescue false end |
#width ⇒ Object
15 16 17 |
# File 'lib/image_mosaic/image/child.rb', line 15 def width dimensions[0] end |