Class: Grizzled::Grinc::GrincRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/grizzled/grinc.rb

Instance Method Summary collapse

Constructor Details

#initializeGrincRunner

Returns a new instance of GrincRunner.



83
84
# File 'lib/grizzled/grinc.rb', line 83

def initialize
end

Instance Method Details

#runObject



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/grizzled/grinc.rb', line 86

def run
  begin
    params = parse_params
    if params.show_version
      show_version_only
    else
      run_includer params
    end

  rescue UsageError
    return 1

  rescue Interrupt
    $stderr.puts("\nAborted")
    return 1

  rescue
    $stderr.puts("#{PROGRAM_NAME}: #{$!}")
    return 1

  else
    return 0
  end
end