Class: Castaway::RelativeTo
- Inherits:
-
Object
- Object
- Castaway::RelativeTo
- Defined in:
- lib/castaway/relative_to.rb
Instance Method Summary collapse
-
#initialize(image_file_name, production) ⇒ RelativeTo
constructor
A new instance of RelativeTo.
- #position(x, y) ⇒ Object
Constructor Details
#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 |