class SomTimer::RestFacade
Attributes
path[R]
Public Class Methods
new(path)
click to toggle source
# File lib/som_timer/facades/rest_facade.rb, line 4 def initialize(path) @path = path @service = SomTimer::Service.new(@path) end
Public Instance Methods
create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval)
click to toggle source
# File lib/som_timer/facades/rest_facade.rb, line 25 def create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval) SomTimer::Rest.new(response_create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval)) end
response_create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval)
click to toggle source
# File lib/som_timer/facades/rest_facade.rb, line 13 def response_create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval) @service.create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval) end
response_rests()
click to toggle source
# File lib/som_timer/facades/rest_facade.rb, line 9 def response_rests @service.rests end
rests()
click to toggle source
# File lib/som_timer/facades/rest_facade.rb, line 17 def rests rests_info = response_rests[:rests] rests_info.map do |rest| SomTimer::Rest.new(rest) end end