Sha256: 27509d2fb5395f0504eb6480bdda31d625bbdfd019542ddb7c30aa6dfefc6cf1

Contents?: true

Size: 668 Bytes

Versions: 16

Compression:

Stored size: 668 Bytes

Contents

# encoding: UTF-8

require 'gli'
require 'pp'

Grache::CLI.module_eval do
  pre do |_global, _command, _options, _args|
    # Pre logic here
    # Return true to proceed; false to abort and not call the
    # chosen command
    # Use skips_pre before a command to skip this block
    # on that command only
    true
  end

  post do |_global, _command, _options, _args|
    # Post logic here
    # Use skips_post before a command to skip this
    # block on that command only
  end

  on_error do |_exception|
    # Error logic here
    # return false to skip default error handling
    # binding.pry
    # pp exception.backtrace
    # pp exception
    true
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
grache-0.0.12 lib/grache/cli/hooks.rb
grache-0.0.11 lib/grache/cli/hooks.rb
grache-0.0.10 lib/grache/cli/hooks.rb
grache-0.0.9 lib/grache/cli/hooks.rb
grache-0.0.8 lib/grache/cli/hooks.rb
grache-0.0.7 lib/grache/cli/hooks.rb
grache-0.0.6 lib/grache/cli/hooks.rb
grache-0.0.5 lib/grache/cli/hooks.rb
grache-0.0.4 lib/grache/cli/hooks.rb
grache-0.0.3 lib/grache/cli/hooks.rb
grache-0.0.2 lib/grache/cli/hooks.rb
grache-0.0.2.pre.rc8 lib/grache/cli/hooks.rb
grache-0.0.2.pre.rc4 lib/grache/cli/hooks.rb
grache-0.0.2.pre.rc1 lib/grache/cli/hooks.rb
grache-0.0.2.pre.rc0 lib/grache/cli/hooks.rb
grache-0.0.1 lib/grache/cli/hooks.rb