Class: Sandy::Area

Inherits:
Object
  • Object
show all
Defined in:
lib/sandy/area.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {})
  @name = location
  @customers_affected = customers_affected
  @region = options[:region]
  @total_customers = options[:total_customers]
  @latitude = options[:latitude]
  @longitude = options[:longitude]
  @estimated_recovery_time = options[:estimated_recovery_time]
end

Instance Attribute Details

#customers_affectedObject (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_timeObject (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

#latitudeObject (readonly)

Returns the value of attribute latitude.



3
4
5
# File 'lib/sandy/area.rb', line 3

def latitude
  @latitude
end

#longitudeObject (readonly)

Returns the value of attribute longitude.



3
4
5
# File 'lib/sandy/area.rb', line 3

def longitude
  @longitude
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/sandy/area.rb', line 3

def name
  @name
end

#regionObject (readonly)

Returns the value of attribute region.



3
4
5
# File 'lib/sandy/area.rb', line 3

def region
  @region
end

#total_customersObject (readonly)

Returns the value of attribute total_customers.



3
4
5
# File 'lib/sandy/area.rb', line 3

def total_customers
  @total_customers
end