Class: Company::Location
- Defined in:
- lib/company/resources/location.rb
Overview
Where work happens: one address the business drives to.
Class Method Summary collapse
-
.attributes ⇒ Object
What every location reads, by the vocabulary's names.
Instance Method Summary collapse
-
#city ⇒ String?
Town.
-
#customer ⇒ Customer?
Whose place it is, where they came back beside the location.
-
#latitude ⇒ Numeric?
How far north the place is.
-
#longitude ⇒ Numeric?
How far east the place is.
-
#street ⇒ String?
Street, number included.
-
#zip ⇒ String?
ZIP code.
Methods inherited from Resource
#id, #initialize, keys, node_keys
Constructor Details
This class inherits a constructor from Company::Resource
Class Method Details
.attributes ⇒ Object
What every location reads, by the vocabulary's names.
5 |
# File 'lib/company/resources/location.rb', line 5 def self.attributes = %i[id street city zip latitude longitude] |
Instance Method Details
#city ⇒ String?
Returns town.
11 |
# File 'lib/company/resources/location.rb', line 11 def city = attribute :city |
#customer ⇒ Customer?
Returns whose place it is, where they came back beside the location.
23 |
# File 'lib/company/resources/location.rb', line 23 def customer = record Customer, :customer |
#latitude ⇒ Numeric?
Returns how far north the place is.
17 |
# File 'lib/company/resources/location.rb', line 17 def latitude = attribute :latitude |
#longitude ⇒ Numeric?
Returns how far east the place is.
20 |
# File 'lib/company/resources/location.rb', line 20 def longitude = attribute :longitude |
#street ⇒ String?
Returns street, number included.
8 |
# File 'lib/company/resources/location.rb', line 8 def street = attribute :street |
#zip ⇒ String?
Returns ZIP code.
14 |
# File 'lib/company/resources/location.rb', line 14 def zip = attribute :zip |