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
27 28 29 |
# File 'lib/image_size.rb', line 27 def height self[1] end |
#to_s ⇒ Object
join using ‘x’
16 17 18 |
# File 'lib/image_size.rb', line 16 def to_s join('x') end |
#width ⇒ Object Also known as: w
get first element
21 22 23 |
# File 'lib/image_size.rb', line 21 def width self[0] end |