Class: Postmen::Dimension

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/postmen/dimension.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common

#to_hash

Constructor Details

#initialize(options) ⇒ Dimension

Returns a new instance of Dimension.



10
11
12
13
14
15
# File 'lib/postmen/dimension.rb', line 10

def initialize(options)
  @width = options[:width]
  @height = options[:height]
  @depth = options[:depth]
  @unit = options[:unit]
end

Instance Attribute Details

#depthObject (readonly)

Returns the value of attribute depth.



5
6
7
# File 'lib/postmen/dimension.rb', line 5

def depth
  @depth
end

#heightObject (readonly)

Returns the value of attribute height.



5
6
7
# File 'lib/postmen/dimension.rb', line 5

def height
  @height
end

#unitObject (readonly)

Returns the value of attribute unit.



5
6
7
# File 'lib/postmen/dimension.rb', line 5

def unit
  @unit
end

#widthObject (readonly)

Returns the value of attribute width.



5
6
7
# File 'lib/postmen/dimension.rb', line 5

def width
  @width
end