Module: TimeBoots

Extended by:
TimeBoots
Included in:
TimeBoots, Boot
Defined in:
lib/time_boots.rb,
lib/time_boots/boot.rb,
lib/time_boots/jump.rb,
lib/time_boots/lace.rb,
lib/time_boots/measure.rb,
lib/time_boots/version.rb,
lib/time_boots/boot/day.rb,
lib/time_boots/boot/week.rb,
lib/time_boots/boot/year.rb,
lib/time_boots/boot/month.rb,
lib/time_boots/boot/simple.rb

Defined Under Namespace

Modules: Measure Classes: Boot, DayBoot, HourBoot, Jump, Lace, MinBoot, MonthBoot, SecBoot, SimpleBoot, WeekBoot, YearBoot

Constant Summary collapse

VERSION =
'0.0.2'.freeze

Instance Method Summary collapse

Instance Method Details

#advance(step, tm, steps = 1) ⇒ Object



63
64
65
# File 'lib/time_boots.rb', line 63

def advance(step, tm, steps = 1)
  Boot.get(step).advance(step, tm, steps)
end

#ceil(step, tm) ⇒ Object



51
52
53
# File 'lib/time_boots.rb', line 51

def ceil(step, tm)
  Boot.get(step).ceil(tm)
end

#dayObject



29
30
31
# File 'lib/time_boots.rb', line 29

def day
  Boot.get(:day)
end

#decrease(step, tm, steps = 1) ⇒ Object



67
68
69
# File 'lib/time_boots.rb', line 67

def decrease(step, tm, steps = 1)
  Boot.get(step).decrease(step, tm, steps)
end

#floor(step, tm) ⇒ Object

Boot-less method shortcuts :nocov:



47
48
49
# File 'lib/time_boots.rb', line 47

def floor(step, tm)
  Boot.get(step).floor(tm)
end

#hourObject



25
26
27
# File 'lib/time_boots.rb', line 25

def hour
  Boot.get(:hour)
end

#jump(step, steps = 1) ⇒ Object



79
80
81
# File 'lib/time_boots.rb', line 79

def jump(step, steps = 1)
  Boot.get(step).jump(steps)
end

#lace(step, from, to, options = {}) ⇒ Object



87
88
89
# File 'lib/time_boots.rb', line 87

def lace(step, from, to, options = {})
  Boot.get(step).lace(from, to, options)
end

#measure(from, to, options = {}) ⇒ Object



83
84
85
# File 'lib/time_boots.rb', line 83

def measure(from, to, options = {})
  Measure.measure(from, to, options)
end

#minObject



21
22
23
# File 'lib/time_boots.rb', line 21

def min
  Boot.get(:min)
end

#monthObject



37
38
39
# File 'lib/time_boots.rb', line 37

def month
  Boot.get(:month)
end

#range(step, tm, steps = 1) ⇒ Object



71
72
73
# File 'lib/time_boots.rb', line 71

def range(step, tm, steps = 1)
  Boot.get(step).range(tm, steps)
end

#range_back(step, tm, steps = 1) ⇒ Object



75
76
77
# File 'lib/time_boots.rb', line 75

def range_back(step, tm, steps = 1)
  Boot.get(step).range_back(tm, steps)
end

#round(step, tm) ⇒ Object



55
56
57
# File 'lib/time_boots.rb', line 55

def round(step, tm)
  Boot.get(step).round(tm)
end

#round?(step, tm) ⇒ Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/time_boots.rb', line 59

def round?(step, tm)
  Boot.get(step).round?(tm)
end

#secObject

Boot shortcuts



17
18
19
# File 'lib/time_boots.rb', line 17

def sec
  Boot.get(:sec)
end

#stepsObject

rubocop:enable Style/ModuleFunction



9
10
11
# File 'lib/time_boots.rb', line 9

def steps
  Boot.steps
end

#weekObject



33
34
35
# File 'lib/time_boots.rb', line 33

def week
  Boot.get(:week)
end

#yearObject



41
42
43
# File 'lib/time_boots.rb', line 41

def year
  Boot.get(:year)
end