Class: Jaspec::Cli

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

Instance Method Summary collapse

Instance Method Details



12
13
14
# File 'lib/jaspec/cli.rb', line 12

def print_help
  puts "Usage: jaspec [file or directory]"
end

#process(argv) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/jaspec/cli.rb', line 3

def process(argv)
  @argv = argv
  if @argv.size > 0
    run
  else
    print_help
  end
end

#runObject



16
17
18
# File 'lib/jaspec/cli.rb', line 16

def run
  Jaspec::Runner.run File.expand_path(@argv[0])
end