Class: Enforce::CommandLine
- Inherits:
-
Object
- Object
- Enforce::CommandLine
- Includes:
- Singleton
- Defined in:
- lib/enforce/command_line.rb
Instance Method Summary collapse
Instance Method Details
#execute(argv = []) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/enforce/command_line.rb', line 7 def execute(argv=[]) return show_usage if argv.empty? file = find_file argv[0] return show_file_not_found unless file handler.execute file handler.failed? ? 1 : 0 end |