Class: Media::Helper::Size

Inherits:
Object
  • Object
show all
Defined in:
lib/media/helper/size.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Size

Returns a new instance of Size.


4
5
6
7
# File 'lib/media/helper/size.rb', line 4

def initialize(args)
  @width  = args.fetch(:width)
  @height = args.fetch(:height)
end

Instance Method Details

#to_sObject


9
10
11
# File 'lib/media/helper/size.rb', line 9

def to_s
  [@width, @height].join('x')
end