Class: Checkoff::QuickaddSubcommand
- Inherits:
-
Object
- Object
- Checkoff::QuickaddSubcommand
- Defined in:
- lib/checkoff/cli.rb,
sig/checkoff.rbs
Overview
CLI subcommand that creates a task
Instance Attribute Summary collapse
-
#task_name ⇒ Object
readonly
Returns the value of attribute task_name.
-
#workspace_name ⇒ Object
readonly
Returns the value of attribute workspace_name.
Instance Method Summary collapse
-
#initialize(workspace_name, task_name, config: Checkoff::Internal::ConfigLoader.load(:asana), workspaces: Checkoff::Workspaces.new(config:), tasks: Checkoff::Tasks.new(config:)) ⇒ Object
constructor
@param
workspace_name. - #run ⇒ void
Constructor Details
#initialize(workspace_name, task_name, config: Checkoff::Internal::ConfigLoader.load(:asana), workspaces: Checkoff::Workspaces.new(config:), tasks: Checkoff::Tasks.new(config:)) ⇒ Object
@param workspace_name
@param task_name
@param config
@param workspaces
@param tasks
283 284 285 286 287 288 289 290 291 |
# File 'lib/checkoff/cli.rb', line 283 def initialize(workspace_name, task_name, config: Checkoff::Internal::ConfigLoader.load(:asana), workspaces: Checkoff::Workspaces.new(config:), tasks: Checkoff::Tasks.new(config:)) @workspace_name = workspace_name @task_name = task_name @workspaces = workspaces @tasks = tasks end |
Instance Attribute Details
#task_name ⇒ Object (readonly)
Returns the value of attribute task_name.
224 225 226 |
# File 'sig/checkoff.rbs', line 224 def task_name @task_name end |
#workspace_name ⇒ Object (readonly)
Returns the value of attribute workspace_name.
221 222 223 |
# File 'sig/checkoff.rbs', line 221 def workspace_name @workspace_name end |
Instance Method Details
#run ⇒ void
This method returns an undefined value.
294 295 296 297 298 |
# File 'lib/checkoff/cli.rb', line 294 def run workspace = @workspaces.workspace_or_raise(workspace_name) @tasks.add_task(task_name, workspace_gid: workspace.gid) end |