Sha256: c8cb1269457a5ad7f8f1bfd4920a1f00a0632c2dfb948a6ade81600c2bfb959a

Contents?: true

Size: 750 Bytes

Versions: 1

Compression:

Stored size: 750 Bytes

Contents

class Object # `significant == self` is the way to end the recursion.
  unless Object.instance_methods.include?(:blank?)
    def blank?
      respond_to?(:empty?) ? empty? : !self
    end
  end

  def significant?
    !blank? and significant == self
  end

  def significant
    self
  end

  def keep_significant
    respond_to?(:replace) ? replace(significant) : significant
  end

  def significant!
    keep_significant
  end

  def significance
    significant? ? significant : nil
  end

  def significant_significance
    significant.significance
  end

  def significant_significance?
    significant_significance.significant?
  end
  alias_method :sigsig,   :significant_significance
  alias_method :sigsig?,  :significant_significance?
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
significance-0.2.1 lib/significance/core_ext/object.rb