Top Level Namespace

Defined Under Namespace

Modules: LogMethods, SprocketsFS Classes: LogRow, MongoLog, String, Time

Constant Summary collapse

ML =
MongoLog

Instance Method Summary collapse

Instance Method Details

#get_opt_argsObject



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/sprockets_fs/log.rb', line 150

def get_opt_args
  require 'optparse'

  options = {}
  OptionParser.new do |opts|
    opts.on("-s","--s SPEC") do |v|
      v = /#{v[1..-1]}/i if v[0..0] == '/'
      options[:spec] = v
    end

    opts.on("-c","--c CALLER") do |v|
      v = /#{v[1..-1]}/i if v[0..0] == '/'
      options[:caller] = v
    end
  end.parse!

  puts "options #{options.inspect}"

  options
end