class String
Public Instance Methods
to_on()
click to toggle source
# File lib/onify/string.rb, line 2 def to_on if self[-2,2] == "on" self elsif self[-3,2] == "on" self[0..-2] else self + "on" end end
# File lib/onify/string.rb, line 2 def to_on if self[-2,2] == "on" self elsif self[-3,2] == "on" self[0..-2] else self + "on" end end