Class: ImageMosaic::Image::Child

Inherits:
Object
  • Object
show all
Defined in:
lib/image_mosaic/image/child.rb

Instance Method Summary collapse

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

#heightObject



19
20
21
# File 'lib/image_mosaic/image/child.rb', line 19

def height
  dimensions[1]
end

#valid?Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
# File 'lib/image_mosaic/image/child.rb', line 8

def valid?
  image
  true
rescue
  false
end

#widthObject



15
16
17
# File 'lib/image_mosaic/image/child.rb', line 15

def width
  dimensions[0]
end