Class: Base::Resize

Inherits:
Object
  • Object
show all
Defined in:
lib/base/models/resize.rb

Overview

Class for the resize data.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#heightObject (readonly)

Returns the value of attribute height.



6
7
8
# File 'lib/base/models/resize.rb', line 6

def height
  @height
end

#widthObject (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_sObject



14
15
16
# File 'lib/base/models/resize.rb', line 14

def to_s
  [@width, @height].join('_')
end