Sha256: 10091e1dd2f9d93a6ddee1b5ff728826394e6e4456c727f6123c78acaeec1489

Contents?: true

Size: 553 Bytes

Versions: 86

Compression:

Stored size: 553 Bytes

Contents

class Thor
  class Options < Arguments
    def check_unknown!
      # thor >= 0.15.0
      unknown = if defined? @extra
        # an unknown option starts with - or -- and has no more --'s afterward.
        @extra.select { |str| str =~ /^--?(?:(?!--).)*$/ }
      # thor < 0.15.0
      else
        @unknown
      end
      raise UnknownArgumentError, "shelly: unrecognized option '#{unknown.join(', ')}'\n" +
        "Usage: shelly [COMMAND]... [OPTIONS]\n" +
        "Try 'shelly --help' for more information" unless unknown.empty?
    end
  end
end

Version data entries

86 entries across 86 versions & 1 rubygems

Version Path
shelly-0.5.7 lib/thor/options.rb
shelly-0.5.6 lib/thor/options.rb
shelly-0.5.5 lib/thor/options.rb
shelly-0.5.4 lib/thor/options.rb
shelly-0.5.3 lib/thor/options.rb
shelly-0.5.2 lib/thor/options.rb
shelly-0.5.1 lib/thor/options.rb
shelly-0.5.0 lib/thor/options.rb
shelly-0.4.42 lib/thor/options.rb
shelly-0.4.41 lib/thor/options.rb
shelly-0.4.40 lib/thor/options.rb
shelly-0.4.39 lib/thor/options.rb
shelly-0.4.38 lib/thor/options.rb
shelly-0.4.37 lib/thor/options.rb
shelly-0.4.36 lib/thor/options.rb
shelly-0.4.35 lib/thor/options.rb
shelly-0.4.34 lib/thor/options.rb
shelly-0.4.33 lib/thor/options.rb
shelly-0.4.32 lib/thor/options.rb
shelly-0.4.31 lib/thor/options.rb