Class: Media::Size
- Inherits:
-
Object
- Object
- Media::Size
- Defined in:
- lib/media/size.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Size
constructor
A new instance of Size.
- #to_s ⇒ Object
Constructor Details
#initialize(args) ⇒ Size
Returns a new instance of Size.
3 4 5 6 |
# File 'lib/media/size.rb', line 3 def initialize(args) @width = args.fetch(:width) @height = args.fetch(:height) end |
Instance Method Details
#to_s ⇒ Object
8 9 10 |
# File 'lib/media/size.rb', line 8 def to_s [@width, @height].join('x') end |