Sha256: 97455678b737e1a11ad0ffa910b2115558640fbf809a173646c142464ead5f20

Contents?: true

Size: 955 Bytes

Versions: 1

Compression:

Stored size: 955 Bytes

Contents

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

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

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

class Hash  # @private
  alias_method :blank?, :empty?
end

class String  # @private
  def blank?; self !~ /\S/; end
end

class NilClass  # @private
  def duplicable?; false; end
  def blank?; true; end
end

class FalseClass  # @private
  def duplicable?; false; end
  def blank?; true; end
end

class TrueClass  # @private
  def duplicable?; false; end
  def blank?; false; end
end

class Symbol  # @private
  def duplicable?; false; end
  def to_proc; Proc.new { |*args| args.shift.__send__(self, *args) }; end
end

class Numeric  # @private
  def duplicable?; false; end
  def blank?; false; end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blather-0.4.16 lib/blather/core_ext/active_support.rb