Sha256: 5e39445c1fd4be97a627d8d063d5dcd58bdb0e86ee2d2affbef5eadc307ae5bd

Contents?: true

Size: 377 Bytes

Versions: 1

Compression:

Stored size: 377 Bytes

Contents

Ego.plugin do |robot|
  robot.can 'help you write plug-ins'

  robot.on_unhandled_query do |query|
    require 'ego/plugin_helper'

    helper = Ego::PluginHelper.new(
      query: query,
      program_name: options.usage.program_name
    )

    if $stdout.isatty
      alert helper.hint
    end

    if verbose? || !$stdout.isatty
      puts helper.template
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ego-0.5.0 lib/ego/plugins/fallback.rb