Class: SomTimer
- Inherits:
-
Object
- Object
- SomTimer
- Defined in:
- lib/som_timer.rb
Defined Under Namespace
Classes: Service
Class Method Summary collapse
- .create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval, path = "rests") ⇒ Object
- .exercises(path = "exercises") ⇒ Object
- .hello_world ⇒ Object
- .one_timer(path = "timers/1") ⇒ Object
- .rand_exercise(duration, category, path = "rand_exercise") ⇒ Object
- .rests(path = "rests") ⇒ Object
- .update_timer(work_interval, rest_interval, sound, path = "timers/1") ⇒ Object
Class Method Details
.create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval, path = "rests") ⇒ Object
37 38 39 40 |
# File 'lib/som_timer.rb', line 37 def self.create_rest(, , content_selected, focus_interval, rest_interval, path = "rests") service = Service.new(path) service.create_rest(, , content_selected, focus_interval, rest_interval) end |
.exercises(path = "exercises") ⇒ Object
27 28 29 30 |
# File 'lib/som_timer.rb', line 27 def self.exercises(path = "exercises") service = Service.new(path) service.exercises end |
.hello_world ⇒ Object
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
17 18 19 20 |
# File 'lib/som_timer.rb', line 17 def self.one_timer(path = "timers/1") service = Service.new(path) service.timer end |
.rand_exercise(duration, category, path = "rand_exercise") ⇒ Object
22 23 24 25 |
# File 'lib/som_timer.rb', line 22 def self.rand_exercise(duration, category, path = "rand_exercise") service = Service.new(path) service.rand_exercise(duration, category) end |
.rests(path = "rests") ⇒ Object
32 33 34 35 |
# File 'lib/som_timer.rb', line 32 def self.rests(path = "rests") service = Service.new(path) service.rests end |
.update_timer(work_interval, rest_interval, sound, path = "timers/1") ⇒ Object
12 13 14 15 |
# File 'lib/som_timer.rb', line 12 def self.update_timer(work_interval, rest_interval, sound, path = "timers/1") service = Service.new(path) service.update_timer(work_interval, rest_interval, sound) end |