Method: Red::DataNode::Symbol#camelize

Defined in:
lib/red/nodes/data_nodes.rb

#camelize(string, disabled = false) ⇒ Object



62
63
64
65
66
67
68
# File 'lib/red/nodes/data_nodes.rb', line 62

def camelize(string, disabled = false)
  return string.gsub(/@/,'').gsub('?','_bool').gsub('!','_bang').gsub('=','_eql')
# return string unless self.camelize?(string) && !disabled
# words = string.gsub(/@/,'').gsub('?','_bool').gsub('!','_bang').gsub('=','_eql').split(/_/)
# underscore = words.shift if words.first.empty?
# return (underscore ? '_' : '') + words[0] + words[1..-1].map {|word| word == word.upcase ? word : word.capitalize }.join
end