Method: Castaway::RelativeTo#initialize

Defined in:
lib/castaway/relative_to.rb

#initialize(image_file_name, production) ⇒ RelativeTo

Returns a new instance of RelativeTo.



6
7
8
9
10
11
12
# File 'lib/castaway/relative_to.rb', line 6

def initialize(image_file_name, production)
  path = production.resource(image_file_name)
  image = MiniMagick::Image.new(path)
  @width = image.width.to_f
  @height = image.height.to_f
  @production = production
end