Class: FreightKit::Model
- Inherits:
-
Object
- Object
- FreightKit::Model
- Includes:
- ActiveModel::AttributeAssignment, ActiveModel::Validations
- Defined in:
- lib/freight_kit/model.rb
Direct Known Subclasses
Contact, Credential, DateTime, Label, Location, Price, Rate, Response, Shipment, ShipmentEvent
Instance Method Summary collapse
- #attributes ⇒ Object (also: #to_hash)
-
#initialize(attributes = {}) ⇒ Model
constructor
A new instance of Model.
Constructor Details
#initialize(attributes = {}) ⇒ Model
Returns a new instance of Model.
8 9 10 |
# File 'lib/freight_kit/model.rb', line 8 def initialize(attributes = {}) assign_attributes(attributes) end |
Instance Method Details
#attributes ⇒ Object Also known as: to_hash
12 13 14 |
# File 'lib/freight_kit/model.rb', line 12 def attributes instance_values.with_indifferent_access end |