lib/fanforce/utils.rb in fanforce-0.1.7 vs lib/fanforce/utils.rb in fanforce-0.1.8

- old
+ new

@@ -1,11 +1,19 @@ require 'uri' require 'query_string_parser' module Fanforce::Utils - def self.included(base) - base.extend(self) + #def self.included(base) + # base.extend(self) + #end + + def blank?(obj) + obj.respond_to?(:empty?) ? obj.empty? : !obj + end + + def present?(obj) + !blank?(obj) end def self.blank?(obj) obj.respond_to?(:empty?) ? obj.empty? : !obj end