Class: Seconds

Inherits:
Duration show all
Defined in:
lib/days_and_times/duration.rb

Direct Known Subclasses

Second

Instance Attribute Summary

Attributes inherited from Duration

#length, #start_time, #unit

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Duration

#*, #+, #-, #/, #===, #abs_length, #abs_length=, #ago, #anchored?, #before, #coerce, #collect, #create_find_within_method_for, create_find_within_method_for, #days, #each, #each_day, #each_hour, #each_minute, #each_second, #each_week, #end_time, #end_time=, #ending, #from, #from_now, #hours, #in_days, #in_hours, #in_minutes, #in_seconds, #in_weeks, #inspect, #method_missing, #minutes, new, #seconds, #starting, #to_a, #to_f, #to_i, #to_s, #weeks

Constructor Details

#initialize(count = 1, start_time = nil) ⇒ Seconds

Returns a new instance of Seconds.



362
363
364
# File 'lib/days_and_times/duration.rb', line 362

def initialize(count=1,start_time=nil)
  super(count,Second.length,start_time)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Duration

Class Method Details

.lengthObject



365
366
367
# File 'lib/days_and_times/duration.rb', line 365

def self.length
  1
end