Sha256: 698b6c172288791b542d32981a50ffa4702918756c33e4b9faa68498d5fb241e

Contents?: true

Size: 441 Bytes

Versions: 8

Compression:

Stored size: 441 Bytes

Contents

# frozen_string_literal: true

# Arguments
#
# --verbose
# --log <path>

def arg_log(path, class_name)
  @logger_default = false
  @logger_class = class_name
  @logger_path = "#{Dir.pwd}/#{path}"
end

def arg_verbose
  @verbose = true
end

ARGV.each_with_index do |argument, position|
  case argument
  when '--log'
    arg_log(ARGV[position + 1],
            ARGV[position + 2])
  when --'verbose'
    arg_verbose
  else
    next
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-2.6.0.pre.246 lib/rrj/tools/bin/arguments.rb
ruby_rabbitmq_janus-2.6.0.pre.244 lib/rrj/tools/bin/arguments.rb
ruby_rabbitmq_janus-2.6.0.pre.240 lib/rrj/tools/bin/arguments.rb
ruby_rabbitmq_janus-2.6.0.pre.239 lib/rrj/tools/bin/arguments.rb
ruby_rabbitmq_janus-2.6.0.pre.238 lib/rrj/tools/bin/arguments.rb
ruby_rabbitmq_janus-2.6.0.pre.233 lib/rrj/tools/bin/arguments.rb
ruby_rabbitmq_janus-2.6.0.pre.229 lib/rrj/tools/bin/arguments.rb
ruby_rabbitmq_janus-2.6.0.pre.228 lib/rrj/tools/bin/arguments.rb