Class: GBWorkDay::Time
Instance Attribute Summary collapse
-
#work_week ⇒ Object
Returns the value of attribute work_week.
Class Method Summary collapse
-
.from_time(time, work_week = nil) ⇒ Object
Create GBWorkingDay::Time object from a given Time object.
Instance Method Summary collapse
Methods inherited from Time
#free?, #minus_with_work_duration, #next_work_day, #plus_with_work_duration, #previous_work_day, #work?, #work_time
Instance Attribute Details
#work_week ⇒ Object
Returns the value of attribute work_week.
4 5 6 |
# File 'lib/gb_work_day/helpers/time.rb', line 4 def work_week @work_week end |
Class Method Details
.from_time(time, work_week = nil) ⇒ Object
Create GBWorkingDay::Time object from a given Time object. Copy constructor.
26 27 28 29 30 |
# File 'lib/gb_work_day/helpers/time.rb', line 26 def from_time(time, work_week=nil) new_time = self.at(time) new_time.work_week = work_week if work_week new_time end |