Class: Abt::Providers::Asana::Commands::Add

Inherits:
BaseCommand show all
Defined in:
lib/abt/providers/asana/commands/add.rb

Instance Attribute Summary

Attributes inherited from BaseCommand

#config, #path

Attributes inherited from BaseCommand

#ari, #cli, #flags

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseCommand

#initialize

Methods inherited from BaseCommand

flags, #initialize

Constructor Details

This class inherits a constructor from Abt::Providers::Asana::BaseCommand

Class Method Details

.descriptionObject



12
13
14
# File 'lib/abt/providers/asana/commands/add.rb', line 12

def self.description
  "Create a new task for the current/specified Asana project"
end

.usageObject



8
9
10
# File 'lib/abt/providers/asana/commands/add.rb', line 8

def self.usage
  "abt add asana[:<project-gid>]"
end

Instance Method Details

#performObject



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/abt/providers/asana/commands/add.rb', line 16

def perform
  require_project!

  task
  warn("Task created")

  if section
    move_task
    warn("Moved to section: #{section['name']}")
  end

  print_task(project, task)
end