Class: ImageSize::Size

Inherits:
Array
  • Object
show all
Defined in:
lib/image_size.rb

Overview

Array joining with ‘x’

Instance Method Summary collapse

Instance Method Details

#heightObject Also known as: h

get second element



28
29
30
# File 'lib/image_size.rb', line 28

def height
  self[1]
end

#to_sObject

join using ‘x’



17
18
19
# File 'lib/image_size.rb', line 17

def to_s
  join('x')
end

#widthObject Also known as: w

get first element



22
23
24
# File 'lib/image_size.rb', line 22

def width
  self[0]
end