Class: SomTimer::RestFacade
- Inherits:
-
Object
- Object
- SomTimer::RestFacade
- Defined in:
- lib/som_timer/facades/rest_facade.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval) ⇒ Object
-
#initialize(path) ⇒ RestFacade
constructor
A new instance of RestFacade.
- #response_create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval) ⇒ Object
- #response_rests ⇒ Object
- #rests ⇒ Object
Constructor Details
#initialize(path) ⇒ RestFacade
Returns a new instance of RestFacade.
4 5 6 7 |
# File 'lib/som_timer/facades/rest_facade.rb', line 4 def initialize(path) @path = path @service = SomTimer::Service.new(@path) end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
2 3 4 |
# File 'lib/som_timer/facades/rest_facade.rb', line 2 def path @path end |
Instance Method Details
#create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval) ⇒ Object
25 26 27 |
# File 'lib/som_timer/facades/rest_facade.rb', line 25 def create_rest(, , content_selected, focus_interval, rest_interval) SomTimer::Rest.new(response_create_rest(, , content_selected, focus_interval, rest_interval)) end |
#response_create_rest(mood_rating_1, mood_rating_2, content_selected, focus_interval, rest_interval) ⇒ Object
13 14 15 |
# File 'lib/som_timer/facades/rest_facade.rb', line 13 def response_create_rest(, , content_selected, focus_interval, rest_interval) @service.create_rest(, , content_selected, focus_interval, rest_interval) end |
#response_rests ⇒ Object
9 10 11 |
# File 'lib/som_timer/facades/rest_facade.rb', line 9 def response_rests @service.rests end |