Class: Abt::Providers::Asana::Commands::Finalize

Inherits:
BaseCommand show all
Defined in:
lib/abt/providers/asana/commands/finalize.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/finalize.rb', line 12

def self.description
  "Move current/specified task to section (column) for finalized tasks"
end

.usageObject



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

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

Instance Method Details

#performObject



16
17
18
19
20
21
22
# File 'lib/abt/providers/asana/commands/finalize.rb', line 16

def perform
  abort("This is a no-op for tasks outside the current project") unless project_gid == config.path.project_gid
  require_task!
  print_task(project_gid, task)

  maybe_move_task
end