Sha256: eed7163a02d68cd827795cc21f5c672cbd7d8e764b78b1fac2cf810ef584b46b

Contents?: true

Size: 543 Bytes

Versions: 15

Compression:

Stored size: 543 Bytes

Contents

require 'thor'

class Lono::Command < Thor
  class << self
    def dispatch(m, args, options, config)
      # Allow calling for help via:
      #   lono generate help
      #   lono generate -h
      #   lono generate --help
      #   lono generate -D
      #
      # as well thor's nomral setting as
      #
      #   lono help generate
      help_flags = Thor::HELP_MAPPINGS + ["help"]
      if args.length > 1 && !(args & help_flags).empty?
        args -= help_flags
        args.insert(-2, "help")
      end
      super
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
lono-3.5.0 lib/lono/command.rb
lono-3.4.1 lib/lono/command.rb
lono-3.4.0 lib/lono/command.rb
lono-3.3.4 lib/lono/command.rb
lono-3.3.2 lib/lono/command.rb
lono-3.3.0 lib/lono/command.rb
lono-3.2.1 lib/lono/command.rb
lono-3.2.0 lib/lono/command.rb
lono-3.1.3 lib/lono/command.rb
lono-3.1.2 lib/lono/command.rb
lono-3.1.1 lib/lono/command.rb
lono-3.0.1 lib/lono/command.rb
lono-3.0.0 lib/lono/command.rb
lono-2.1.0 lib/lono/command.rb
lono-2.0.5 lib/lono/command.rb