Class: Shipment

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/shipment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#special_instructionsObject

Returns the value of attribute special_instructions.



10
11
12
# File 'app/models/shipment.rb', line 10

def special_instructions
  @special_instructions
end

Instance Method Details

#shipped=(value) ⇒ Object



17
18
19
20
# File 'app/models/shipment.rb', line 17

def shipped=(value)
  return unless value == "1" && shipped_at.nil?
  self.shipped_at = Time.now
end

#shipped?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/models/shipment.rb', line 13

def shipped?
  self.shipped_at
end