Class: Customer
- Inherits:
-
Object
- Object
- Customer
- Defined in:
- lib/dubliner/customer.rb
Instance Attribute Summary collapse
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
-
#name ⇒ Object
Returns the value of attribute name.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Instance Method Summary collapse
- #distance ⇒ Object
- #distance=(d) ⇒ Object
-
#initialize(user_id, name, latitude, longitude) ⇒ Customer
constructor
A new instance of Customer.
Constructor Details
#initialize(user_id, name, latitude, longitude) ⇒ Customer
Returns a new instance of Customer.
2 3 4 5 6 7 |
# File 'lib/dubliner/customer.rb', line 2 def initialize(user_id, name, latitude, longitude) self.user_id = user_id self.name = name self.latitude = latitude self.longitude = longitude end |
Instance Attribute Details
#latitude ⇒ Object
Returns the value of attribute latitude.
37 38 39 |
# File 'lib/dubliner/customer.rb', line 37 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude.
37 38 39 |
# File 'lib/dubliner/customer.rb', line 37 def longitude @longitude end |
#name ⇒ Object
Returns the value of attribute name.
37 38 39 |
# File 'lib/dubliner/customer.rb', line 37 def name @name end |
#user_id ⇒ Object
Returns the value of attribute user_id.
37 38 39 |
# File 'lib/dubliner/customer.rb', line 37 def user_id @user_id end |
Instance Method Details
#distance ⇒ Object
33 34 35 |
# File 'lib/dubliner/customer.rb', line 33 def distance @distance end |
#distance=(d) ⇒ Object
29 30 31 |
# File 'lib/dubliner/customer.rb', line 29 def distance=(d) @distance = d end |