Class: CodewarsCli::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/codewars_cli/cli.rb

Instance Method Summary collapse

Instance Method Details

#finalize(kata_name) ⇒ Object



25
26
27
# File 'lib/codewars_cli/cli.rb', line 25

def finalize(kata_name)
  Finalize.find(kata_name, options[:language])
end

#next_kataObject



13
14
15
# File 'lib/codewars_cli/cli.rb', line 13

def next_kata
  Kata.fetch(options[:language]).create_file
end

#submit_kata(kata_name) ⇒ Object



19
20
21
# File 'lib/codewars_cli/cli.rb', line 19

def submit_kata(kata_name)
  SubmitKata.find(kata_name, options[:language]).upload_kata
end

#user(username_or_id) ⇒ Object



7
8
9
# File 'lib/codewars_cli/cli.rb', line 7

def user(username_or_id)
  User.fetch(username_or_id).print_description
end