Class: Base::Resize
- Inherits:
-
Object
- Object
- Base::Resize
- Defined in:
- lib/base/models/resize.rb
Overview
Class for the resize data.
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(width:, height:) ⇒ Resize
constructor
A new instance of Resize.
- #to_s ⇒ Object
Constructor Details
#initialize(width:, height:) ⇒ Resize
Returns a new instance of Resize.
9 10 11 12 |
# File 'lib/base/models/resize.rb', line 9 def initialize(width:, height:) @height = height @width = width end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
6 7 8 |
# File 'lib/base/models/resize.rb', line 6 def height @height end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
7 8 9 |
# File 'lib/base/models/resize.rb', line 7 def width @width end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/base/models/resize.rb', line 14 def to_s [@width, @height].join('_') end |