Class: SomTimer

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

Defined Under Namespace

Classes: Exercise, ExerciseFacade, Rest, RestFacade, Service, Timer, TimerFacade

Class Method Summary collapse

Class Method Details

.create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval, path = "rests") ⇒ Object



32
33
34
# File 'lib/som_timer.rb', line 32

def self.create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval, path = "rests")
  RestFacade.new(path).create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval)
end

.exercises(path = "exercises") ⇒ Object



24
25
26
# File 'lib/som_timer.rb', line 24

def self.exercises(path = "exercises")
  ExerciseFacade.new(path).exercises
end

.hello_worldObject



6
7
8
9
10
# File 'lib/som_timer.rb', line 6

def self.hello_world
  puts "Hello World! This is SomTimer, a timer that cares.
          \nBased on the pomodoro technique™️, this application provides users with curated wellness content during break intervals.
          \nBuild in rest, so you can focus best."
end

.one_timer(path = "timers/1") ⇒ Object



16
17
18
# File 'lib/som_timer.rb', line 16

def self.one_timer(path = "timers/1")
  TimerFacade.new(path).one_timer
end

.rand_exercise(duration, category, path = "rand_exercise") ⇒ Object



20
21
22
# File 'lib/som_timer.rb', line 20

def self.rand_exercise(duration, category, path = "rand_exercise")
  ExerciseFacade.new(path).rand_exercise(duration, category)
end

.rests(path = "rests") ⇒ Object



28
29
30
# File 'lib/som_timer.rb', line 28

def self.rests(path = "rests")
  RestFacade.new(path).rests
end

.update_timer(work_interval, rest_interval, sound, path = "timers/1") ⇒ Object



12
13
14
# File 'lib/som_timer.rb', line 12

def self.update_timer(work_interval, rest_interval, sound, path = "timers/1")
  TimerFacade.new(path).update_timer(work_interval, rest_interval, sound)
end