Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/extra/period.rb

Instance Method Summary collapse

Instance Method Details

#daysPeriod

Returns:



245
246
247
# File 'lib/extra/period.rb', line 245

def days
  Period::make(days: 1) * self
end

#hoursPeriod

Returns:



251
252
253
# File 'lib/extra/period.rb', line 251

def hours
  Period::make(hours: 1) * self
end

#minutesPeriod

Returns:



257
258
259
# File 'lib/extra/period.rb', line 257

def minutes
  Period::make(minutes: 1) * self
end

#secondsPeriod

Returns:



263
264
265
# File 'lib/extra/period.rb', line 263

def seconds
  Period::make(seconds: 1) * self
end

#weeksPeriod

Returns:



239
240
241
# File 'lib/extra/period.rb', line 239

def weeks
  Period::make(weeks: 1) * self
end