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



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

def height
  self[1]
end

#to_sObject

join using ‘x’



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

def to_s
  join('x')
end

#widthObject Also known as: w

get first element



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

def width
  self[0]
end