Module: Xcflushd::GLIHelpers

Defined in:
lib/xcflushd/gli_helpers.rb

Defined Under Namespace

Classes: BackendURI, GenericURI, PositiveMinMaxInt, RedisURI

Constant Summary collapse

POSITIVE_N_RE =
/\A[1-9]\d*\z/.freeze

Instance Method Summary collapse

Instance Method Details

#set_title(title) ⇒ Object



75
76
77
78
79
80
81
# File 'lib/xcflushd/gli_helpers.rb', line 75

def set_title(title)
  if Process.respond_to? :setproctitle
    Process.setproctitle title
  else
    $0 = title
  end
end

#start_xcflusher(options) ⇒ Object



71
72
73
# File 'lib/xcflushd/gli_helpers.rb', line 71

def start_xcflusher(options)
  Xcflushd::Runner.run(Hash[options.map { |k, v| [k.to_s.tr('-', '_').to_sym, v] }])
end