Sha256: f0caceadd7e72567e2d878f7552ed3e3d379a1236d64a3a02722e67d76186034

Contents?: true

Size: 539 Bytes

Versions: 19

Compression:

Stored size: 539 Bytes

Contents

RuboCop::Options.new.opts.instance_eval("@stack", __FILE__, __LINE__).map(&:list).flatten.each do |opt|
  short = opt.short.map { |arg| arg.delete_prefix("-") }
  long = opt.long.map { |arg| arg.delete_prefix("--") }

  short.unshift(nil) if opt.short.empty?
  long.unshift(nil) if opt.long.empty?

  if opt.arg
    option(*short, *long, opt.desc.join(" "), argument: :optional) do |value|
      r_args.append(*opt.long, value)
    end
  else
    flag(*short, *long, opt.desc.join(" ")) do
      r_args.append(*opt.long)
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rfix-1.4.1 lib/rfix/commands/helper/rubocop.rb
rfix-1.4.0.pre.201 lib/rfix/commands/helper/rubocop.rb
rfix-1.4.0 lib/rfix/commands/helper/rubocop.rb
rfix-1.3.0.pre.199 lib/rfix/commands/helper/rubocop.rb
rfix-1.2.6.pre.198 lib/rfix/commands/helper/rubocop.rb
rfix-1.2.6 lib/rfix/commands/helper/rubocop.rb
rfix-1.2.2.pre.174 lib/rfix/commands/helper/rubocop.rb
rfix-1.2.5 lib/rfix/commands/helper/rubocop.rb
rfix-1.2.4 lib/rfix/commands/helper/rubocop.rb
rfix-1.2.3.pre lib/rfix/commands/helper/rubocop.rb
rfix-1.2.2.pre lib/rfix/commands/helper/rubocop.rb
rfix-1.2.2.pre.172 lib/rfix/commands/helper/rubocop.rb
rfix-1.2.2 lib/rfix/commands/helper/rubocop.rb
rfix-1.1.0.pre.150 lib/rfix/commands/helper/rubocop.rb
rfix-1.2.0 lib/rfix/commands/helper/rubocop.rb
rfix-1.1.4.pre lib/rfix/commands/helper/rubocop.rb
rfix-1.1.1.pre lib/rfix/commands/helper/rubocop.rb
rfix-1.1.0.pre.149 lib/rfix/commands/helper/rubocop.rb
rfix-1.1.0.pre.147 lib/rfix/commands/helper/rubocop.rb