Class: TrelloCli::CLI::Card::Create
- Inherits:
-
Object
- Object
- TrelloCli::CLI::Card::Create
- Defined in:
- lib/trello_cli/cli/card/create.rb
Instance Method Summary collapse
-
#initialize ⇒ Create
constructor
A new instance of Create.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Create
Returns a new instance of Create.
6 7 8 |
# File 'lib/trello_cli/cli/card/create.rb', line 6 def initialize @options = { members: [] } end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/trello_cli/cli/card/create.rb', line 10 def run option_parser.parse! card = create_card data = { id: card.attributes[:id], name: card.attributes[:name], desc: card.attributes[:desc] } puts TrelloCli::Formatters::CardCreate.new(data).output @options[:output] end |