Class: Postmen::Weight

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common

#to_hash

Constructor Details

#initialize(options) ⇒ Weight

Returns a new instance of Weight.



8
9
10
11
# File 'lib/postmen/weight.rb', line 8

def initialize(options)
  @value = options[:value]
  @unit = options[:unit]
end

Instance Attribute Details

#unitObject (readonly)

Returns the value of attribute unit.



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

def unit
  @unit
end

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end