lib/string_extensions.rb in ulla-0.9.9 vs lib/string_extensions.rb in ulla-0.9.9.1

- old
+ new

@@ -1,7 +1,21 @@ module StringExtensions + unless method_defined?(:blank?) + # from Active Support library + def blank? + self !~ /\S/ + end + end + + unless method_defined?(:start_with?) + # from Ruby Facets library + def start_with?(prefix) + self.index(prefix) == 0 + end + end + def remove_internal_spaces gsub(/[\n|\r|\s]+/, '') end def rgb_to_integer @@ -12,6 +26,5 @@ end end end String.send :include, StringExtensions -