Top Level Namespace

Defined Under Namespace

Modules: MedularisDaemonsCommon

Instance Method Summary collapse

Instance Method Details

#ruby_18Object



5
6
7
# File 'lib/ruby_compat.rb', line 5

def ruby_18
  yield
end

#ruby_19Object



9
10
11
# File 'lib/ruby_compat.rb', line 9

def ruby_19
  false
end

#this_methodObject

SCM_ID: $Id$ encoding: UTF-8



4
5
6
7
8
9
10
11
12
13
# File 'lib/debug_utils.rb', line 4

def this_method
  method = caller[0]
  pieces = method.split('/')
  
  if (pieces.length >= 1)
    method = pieces[pieces.length - 1]
  end
  
  return "[#{method}]"
end

#this_method_w_timestampObject



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/debug_utils.rb', line 15

def this_method_w_timestamp
  method = caller[0]
  pieces = method.split('/')
  
  if (pieces.length >= 1)
    method = pieces[pieces.length - 1]
  end
  
  time = Time.now
  strtime = time.strftime("%H:%M:%S")
  
  return "[#{strtime} #{method}]"
end