Class: AddElectricVehicleChargingLoad::ElectricVehicle
- Inherits:
-
Object
- Object
- AddElectricVehicleChargingLoad::ElectricVehicle
- Defined in:
- lib/measures/AddElectricVehicleChargingLoad/measure.rb
Instance Attribute Summary collapse
-
#arrival_time ⇒ Object
time this EV arrives at the building.
-
#connected_to_charger ⇒ Object
Type: boolean.
-
#end_charge_time ⇒ Object
time this EV ends charging.
-
#has_been_charged ⇒ Object
Type: boolean.
-
#leave_time ⇒ Object
time this EV arrives at the building.
-
#name ⇒ Object
Type: string.
-
#needed_charge_hours ⇒ Object
needed number of hours to charge to full.
-
#start_charge_time ⇒ Object
time this EV starts charging.
Instance Method Summary collapse
-
#initialize(name) ⇒ ElectricVehicle
constructor
A new instance of ElectricVehicle.
Constructor Details
#initialize(name) ⇒ ElectricVehicle
Returns a new instance of ElectricVehicle.
149 150 151 152 153 154 155 156 157 158 |
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 149 def initialize(name) @name = name @has_been_charged = false @connected_to_charger = false @arrival_time = nil @leave_time = nil @start_charge_time = nil @end_charge_time = nil @needed_charge_hours = nil end |
Instance Attribute Details
#arrival_time ⇒ Object
time this EV arrives at the building
163 164 165 |
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 163 def arrival_time @arrival_time end |
#connected_to_charger ⇒ Object
Type: boolean. if this EV is currently connected to a charger
162 163 164 |
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 162 def connected_to_charger @connected_to_charger end |
#end_charge_time ⇒ Object
time this EV ends charging
166 167 168 |
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 166 def end_charge_time @end_charge_time end |
#has_been_charged ⇒ Object
Type: boolean. if this EV has been charged
161 162 163 |
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 161 def has_been_charged @has_been_charged end |
#leave_time ⇒ Object
time this EV arrives at the building
164 165 166 |
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 164 def leave_time @leave_time end |
#name ⇒ Object
Type: string. Name.
160 161 162 |
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 160 def name @name end |
#needed_charge_hours ⇒ Object
needed number of hours to charge to full
167 168 169 |
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 167 def needed_charge_hours @needed_charge_hours end |
#start_charge_time ⇒ Object
time this EV starts charging
165 166 167 |
# File 'lib/measures/AddElectricVehicleChargingLoad/measure.rb', line 165 def start_charge_time @start_charge_time end |