Class: ImageSize::Size
- Inherits:
-
Array
- Object
- Array
- ImageSize::Size
- Defined in:
- lib/image_size.rb
Overview
Array joining with ‘x’
Instance Method Summary collapse
-
#height ⇒ Object
(also: #h)
get second element.
-
#to_s ⇒ Object
join using ‘x’.
-
#width ⇒ Object
(also: #w)
get first element.
Instance Method Details
#height ⇒ Object Also known as: h
get second element
28 29 30 |
# File 'lib/image_size.rb', line 28 def height self[1] end |
#to_s ⇒ Object
join using ‘x’
17 18 19 |
# File 'lib/image_size.rb', line 17 def to_s join('x') end |
#width ⇒ Object Also known as: w
get first element
22 23 24 |
# File 'lib/image_size.rb', line 22 def width self[0] end |