Module: Threatinator::Util

Defined in:
lib/threatinator/util.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.underscore2cc(str) ⇒ Object



4
5
6
# File 'lib/threatinator/util.rb', line 4

def underscore2cc(str)
  str.to_s.split('_').map {|e| e.capitalize }.join
end

Instance Method Details

#cc2underscore(str) ⇒ Object



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

def cc2underscore(str)
  str.to_s.split('_').map {|e| e.capitalize }.join
end