Module: Pandemic::Util

Instance Method Summary collapse

Instance Method Details

#host_port(str) ⇒ Object



3
4
5
# File 'lib/pandemic/util.rb', line 3

def host_port(str)
  [str[/^[^:]+/], str[/[0-9]+$/].to_i]
end

#loggerObject



7
8
9
# File 'lib/pandemic/util.rb', line 7

def logger
  $pandemic_logger
end

#with_mutex(obj) ⇒ Object



11
12
13
# File 'lib/pandemic/util.rb', line 11

def with_mutex(obj)
  obj.extend(MonitorMixin)
end