Class: RComp::CLI
Instance Method Summary collapse
- #generate ⇒ Object
- #init ⇒ Object
-
#initialize(args = [], options = {}, config = {}) ⇒ CLI
constructor
A new instance of CLI.
- #test ⇒ Object
- #version ⇒ Object
Constructor Details
Instance Method Details
#generate ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/rcomp/cli.rb', line 64 def generate Env.guard_uninitialized # Display confirmation dialouge when -O is passed without filter if !@options[:grep] && .overwrite unless yes? "This will overwrite all existing expected results." say 'Aborting...' exit 1 end end if @options[:grep] Runner.run(Suite.load(@options[:grep]), :generate, @options) else Runner.run(Suite.load, :generate, @options) end end |
#init ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rcomp/cli.rb', line 19 def init Env.guard_initialized unless Env.command_exists? @conf.set_command(ask("Enter the command you want to test:")) end Env.initialize_directories puts "RComp successfully initialized" end |