Class: TrelloCli::Requests::CreateCard
- Inherits:
-
Object
- Object
- TrelloCli::Requests::CreateCard
- Includes:
- Shared
- Defined in:
- lib/trello_cli/requests/create_card.rb
Instance Method Summary collapse
- #create(args) ⇒ Object
-
#initialize ⇒ CreateCard
constructor
A new instance of CreateCard.
Methods included from Shared
#connect_to_trello, #key, #token
Constructor Details
#initialize ⇒ CreateCard
Returns a new instance of CreateCard.
7 8 9 |
# File 'lib/trello_cli/requests/create_card.rb', line 7 def initialize connect_to_trello end |
Instance Method Details
#create(args) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/trello_cli/requests/create_card.rb', line 11 def create(args) card = Trello::Card.new 'name' => args[:name], 'desc' => args[:description], 'idBoard' => args[:board_id], 'idList' => args[:list_id] card.save end |