Class: Minglr::Action::Commands
- Inherits:
-
Object
- Object
- Minglr::Action::Commands
- Defined in:
- lib/minglr/action.rb
Class Method Summary collapse
- .attach(options, flag_options, config) ⇒ Object
- .card(options, flag_options, config) ⇒ Object
- .cards(options, flag_options, config) ⇒ Object
- .create(options, flag_options, config) ⇒ Object
- .fetch(options, flag_options, config) ⇒ Object
- .move(options, flag_options, config) ⇒ Object
- .projects(options, flag_options, config) ⇒ Object
- .update(options, flag_options, config) ⇒ Object
- .users(options, flag_options, config) ⇒ Object
Class Method Details
.attach(options, flag_options, config) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/minglr/action.rb', line 29 def self.attach(, , config) raise "Missing card number!" if .empty? card_number = .first file_name = [:file_attachment] Resources::Attachment.attach(card_number, file_name, config[:username], config[:password]) end |
.card(options, flag_options, config) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/minglr/action.rb', line 37 def self.card(, , config) raise "Missing card number!" if .empty? card_number = .first Resources::Card.print_card(card_number, config[:status_property]) end |
.cards(options, flag_options, config) ⇒ Object
44 45 46 |
# File 'lib/minglr/action.rb', line 44 def self.cards(, , config) Resources::Card.print_all(, config[:status_property]) end |
.create(options, flag_options, config) ⇒ Object
48 49 50 |
# File 'lib/minglr/action.rb', line 48 def self.create(, , config) Resources::Card.create(, config[:status_property]) end |
.fetch(options, flag_options, config) ⇒ Object
52 53 54 55 56 57 |
# File 'lib/minglr/action.rb', line 52 def self.fetch(, , config) raise "Missing card number!" if .empty? card_number = .first Resources::Attachment.fetch(card_number, config[:username], config[:password]) end |
.move(options, flag_options, config) ⇒ Object
59 60 61 62 63 64 |
# File 'lib/minglr/action.rb', line 59 def self.move(, , config) raise "Missing card number!" if .empty? card_number = .first Resources::Card.move(card_number, , config) end |
.projects(options, flag_options, config) ⇒ Object
66 67 68 |
# File 'lib/minglr/action.rb', line 66 def self.projects(, , config) Resources::Project.print_all(, config[:status_property]) end |