Class: Tsks::Actions
- Inherits:
-
Object
- Object
- Tsks::Actions
- Defined in:
- lib/tsks/actions.rb
Class Method Summary collapse
- .get_tsk_status(status) ⇒ Object
- .update_server_for_removed_tsks(token) ⇒ Object
- .update_tsks_with_user_id(user_id) ⇒ Object
Class Method Details
.get_tsk_status(status) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/tsks/actions.rb', line 23 def self.get_tsk_status status available_status = { todo: '-', done: '*', doing: '+', freezed: '!', archived: 'x', } available_status[status.to_sym] end |
.update_server_for_removed_tsks(token) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/tsks/actions.rb', line 13 def self.update_server_for_removed_tsks token tsks_uuids = Tsks::Storage.select_removed_tsk_ids if !tsks_uuids.empty? for id in tsks_uuids Tsks::Request.delete "/tsks/#{id}", token end end end |