Class: Commands::New

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/new.rb

Overview

Command to get NotionTask version

Instance Method Summary collapse

Constructor Details

#initialize(args, options) ⇒ New

Returns a new instance of New.



10
11
12
13
14
15
# File 'lib/commands/new.rb', line 10

def initialize(args, options)
  @args = args
  @options = options
  @api = NotionAPI.new
  run
end

Instance Method Details

#runObject



17
18
19
# File 'lib/commands/new.rb', line 17

def run
  puts @api.new_task(@args.join(" "))
end