Class: CamelCase

Inherits:
TokenString::Format show all
Defined in:
lib/token_string.rb

Instance Method Summary collapse

Methods inherited from TokenString::Format

#convert_from, #convert_to, #validate

Instance Method Details

#join(tokens) ⇒ Object



204
# File 'lib/token_string.rb', line 204

def join(tokens);    tokens.join('');   end

#process(token) ⇒ Object



203
# File 'lib/token_string.rb', line 203

def process(token);   token.capitalize;  end

#tokenize(str) ⇒ Object



202
# File 'lib/token_string.rb', line 202

def tokenize(str);    str.gsub( /[A-Z]+/, '_\0' ).split(/_+/);  end