]> git.r.bdr.sh - rbdr/lyricli.rb/blob - lib/lyricli/util.rb
9ae9f6c344f99c0b6766715b54319ed82a7d8f4c
[rbdr/lyricli.rb] / lib / lyricli / util.rb
1 module Lyricli
2 module Util
3 def camelize(str)
4 str.split('_').map {|w| w.capitalize}.join
5 end
6
7 def parse_class(class_name)
8 klass = Module.const_get(class_name)
9 return klass if klass.is_a?(Class)
10 rescue NameError
11 return nil
12 end
13 end
14 end