Sha256: 17482a55e15b96ef1d947d264fdc16a1acc1fce8541df000fb26313a1ed5df02

Contents?: true

Size: 855 Bytes

Versions: 13

Compression:

Stored size: 855 Bytes

Contents

require File.join(File.dirname(__FILE__), 'active_support', 'inheritable_attributes')

class Object # :nodoc:
  def duplicable?; true; end
  def blank?; respond_to?(:empty?) ? empty? : !self; end
  def present?; !blank?; end
end

class Array #:nodoc:
  alias_method :blank?, :empty?
  def extract_options!; last.is_a?(::Hash) ? pop : {}; end
end

class Hash #:nodoc:
  alias_method :blank?, :empty?
end

class String #:nodoc:
  def blank?; self !~ /\S/; end
end

class NilClass #:nodoc:
  def duplicable?; false; end
  def blank?; true; end
end

class FalseClass #:nodoc:
  def duplicable?; false; end
  def blank?; true; end
end

class TrueClass #:nodoc:
  def duplicable?; false; end
  def blank?; false; end
end

class Symbol #:nodoc:
  def duplicable?; false; end
end

class Numeric #:nodoc:
  def duplicable?; false; end
  def blank?; false; end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
sprsquish-blather-0.4.0 lib/blather/core_ext/active_support.rb
sprsquish-blather-0.4.1 lib/blather/core_ext/active_support.rb
sprsquish-blather-0.4.2 lib/blather/core_ext/active_support.rb
sprsquish-blather-0.4.3 lib/blather/core_ext/active_support.rb
sprsquish-blather-0.4.4 lib/blather/core_ext/active_support.rb
blather-0.4.7 lib/blather/core_ext/active_support.rb
blather-0.4.6 lib/blather/core_ext/active_support.rb
blather-0.4.5 lib/blather/core_ext/active_support.rb
blather-0.4.4 lib/blather/core_ext/active_support.rb
blather-0.4.3 lib/blather/core_ext/active_support.rb
blather-0.4.0 lib/blather/core_ext/active_support.rb
blather-0.4.2 lib/blather/core_ext/active_support.rb
blather-0.4.1 lib/blather/core_ext/active_support.rb