Module: Rinne

Defined in:
lib/rinne.rb,
lib/rinne/version.rb

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.camelize(spell) ⇒ Object Also known as: tensei



6
7
8
9
10
11
12
# File 'lib/rinne.rb', line 6

def camelize(spell)
  spell.split("-").map! {|module_word|
    module_word.split("_").map { |class_word|
      class_word.capitalize!
    }.join
  }.join("::")
end

.classify(path, filetype = "*") ⇒ Object



15
16
17
# File 'lib/rinne.rb', line 15

def classify(path, filetype = "*")
  camelize File.basename(path, ".#{filetype}")
end