Class: Sandy::Area
- Inherits:
-
Object
- Object
- Sandy::Area
- Defined in:
- lib/sandy/area.rb
Instance Attribute Summary collapse
-
#customers_affected ⇒ Object
readonly
Returns the value of attribute customers_affected.
-
#estimated_recovery_time ⇒ Object
readonly
Returns the value of attribute estimated_recovery_time.
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#total_customers ⇒ Object
readonly
Returns the value of attribute total_customers.
Instance Method Summary collapse
-
#initialize(customers_affected, location, options = {}) ⇒ Area
constructor
A new instance of Area.
Constructor Details
#initialize(customers_affected, location, options = {}) ⇒ Area
Returns a new instance of Area.
11 12 13 14 15 16 17 18 19 |
# File 'lib/sandy/area.rb', line 11 def initialize(customers_affected, location, = {}) @name = location @customers_affected = customers_affected @region = [:region] @total_customers = [:total_customers] @latitude = [:latitude] @longitude = [:longitude] @estimated_recovery_time = [:estimated_recovery_time] end |
Instance Attribute Details
#customers_affected ⇒ Object (readonly)
Returns the value of attribute customers_affected.
3 4 5 |
# File 'lib/sandy/area.rb', line 3 def customers_affected @customers_affected end |
#estimated_recovery_time ⇒ Object (readonly)
Returns the value of attribute estimated_recovery_time.
3 4 5 |
# File 'lib/sandy/area.rb', line 3 def estimated_recovery_time @estimated_recovery_time end |
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
3 4 5 |
# File 'lib/sandy/area.rb', line 3 def latitude @latitude end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
3 4 5 |
# File 'lib/sandy/area.rb', line 3 def longitude @longitude end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/sandy/area.rb', line 3 def name @name end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
3 4 5 |
# File 'lib/sandy/area.rb', line 3 def region @region end |
#total_customers ⇒ Object (readonly)
Returns the value of attribute total_customers.
3 4 5 |
# File 'lib/sandy/area.rb', line 3 def total_customers @total_customers end |