Class: String

Inherits:
Object show all
Defined in:
lib/notifu/mixins.rb

Instance Method Summary collapse

Instance Method Details

#camelizeObject


41
42
43
44
# File 'lib/notifu/mixins.rb', line 41

def camelize
  return self if self !~ /_/ && self =~ /[A-Z]+.*/
  split('_').map{|e| e.capitalize}.join
end

#to_stateObject


46
47
48
# File 'lib/notifu/mixins.rb', line 46

def to_state
  return self.to_i.to_state
end