class Greyatom::CLI
Public Instance Methods
hello()
click to toggle source
# File lib/greyatom/cli.rb, line 12 def hello() puts "Hello World!" end
open(*puzzle_name)
click to toggle source
# File lib/greyatom/cli.rb, line 40 def open(*puzzle_name) # Fork and Clone User's current lesson lab_name = Greyatom::Puzzle::Parser.new(puzzle_name.join(' ')).parse! Greyatom::Open.new().openALesson(lab_name) end
reset()
click to toggle source
# File lib/greyatom/cli.rb, line 35 def reset() Greyatom::User.new().confirmAndReset end
setup(retries: 5)
click to toggle source
# File lib/greyatom/cli.rb, line 17 def setup(retries: 5) # Check if token already present login, password = Greyatom::NetrcInteractor.new().read if login.nil? || password.nil? print 'Enter your github token here and press [ENTER]: ' password = STDIN.gets.chomp if password.empty? puts "No token provided." exit end end # Check if token is valid user = Greyatom::User.new() user.validate(password) user.setDefaultWorkspace end
submit()
click to toggle source
# File lib/greyatom/cli.rb, line 47 def submit() Greyatom::Submit.new().run end
test()
click to toggle source
# File lib/greyatom/cli.rb, line 52 def test() puts 'Testing...' Greyatom::Test.new().run end
version()
click to toggle source
# File lib/greyatom/cli.rb, line 58 def version puts Greyatom::Cli::VERSION end