lib/octospy/extensions/string.rb in octospy-0.1.1 vs lib/octospy/extensions/string.rb in octospy-0.2.0
- old
+ new
@@ -23,9 +23,16 @@
def colorize_for_irc
StringIrc.new(self)
end
+ def to_boolean
+ case self
+ when 'true' then true
+ when 'false' then false
+ end
+ end
+
def shorten_url
Octospy::Url.shorten self
end
alias_method :shorten, :shorten_url
end