Sha256: 4c4f3469fdfa326acf0b131e0db99ef4cf9031c550a7ca3a960c2262c517a742

Contents?: true

Size: 333 Bytes

Versions: 20

Compression:

Stored size: 333 Bytes

Contents

class NilClass

  # Nil#status makes it possible to pass messages
  # through a "failure" chain.

  def status( status=nil )
    if status
      @status = status
      self
    else
      @status
    end
  end

  # Check status.

  def status?
    return unless @status
    return false if @status.empty?
    return true
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
facets-1.7.38 lib/facets/core/nilclass/status.rb
facets-1.7.0 lib/facets/core/nilclass/status.rb
facets-1.7.30 lib/facets/core/nilclass/status.rb
facets-1.7.46 lib/facets/core/nilclass/status.rb
facets-1.8.20 lib/facets/core/nilclass/status.rb
facets-1.8.51 lib/facets/core/nilclass/status.rb
facets-1.8.0 lib/facets/core/nilclass/status.rb
facets-1.8.49 lib/facets/core/nilclass/status.rb
facets-2.0.0 lib/core/facets/nilclass/status.rb
facets-2.0.1 lib/core/facets/nilclass/status.rb
facets-1.8.54 lib/facets/core/nilclass/status.rb
facets-1.8.8 lib/facets/core/nilclass/status.rb
facets-2.0.2 lib/core/facets/nilclass/status.rb
facets-2.1.1 lib/core/facets/nilclass/status.rb
facets-2.0.3 lib/core/facets/nilclass/status.rb
facets-2.0.4 lib/core/facets/nilclass/status.rb
facets-2.0.5 lib/core/facets/nilclass/status.rb
facets-2.1.0 lib/core/facets/nilclass/status.rb
facets-2.1.2 lib/core/facets/nilclass/status.rb
facets-2.1.3 lib/core/facets/nilclass/status.rb