Sha256: 5945cfa3a6ab8a00d678c17bc458226918c37fda2a86036cde6b682954340fae

Contents?: true

Size: 524 Bytes

Versions: 23

Compression:

Stored size: 524 Bytes

Contents

# frozen_string_literal: true

module Vedeu

  # Represent a boolean object.
  #
  # @api private
  #
  class Boolean

    # @param value [void]
    # @return [Vedeu::Boolean]
    def initialize(value = nil)
      @value = value
    end

    # @return [Boolean]
    def false?
      value.nil? || value == false
    end

    # @return [Boolean]
    def true?
      return false if false?

      true
    end

    private

    # @!attribute [r] value
    # @return [void]
    attr_reader :value

  end # Boolean

end # Vedeu

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
vedeu-0.8.24 lib/vedeu/boolean.rb
vedeu-0.8.23 lib/vedeu/boolean.rb
vedeu-0.8.22 lib/vedeu/boolean.rb
vedeu-0.8.21 lib/vedeu/boolean.rb
vedeu-0.8.20 lib/vedeu/boolean.rb
vedeu-0.8.19 lib/vedeu/boolean.rb
vedeu-0.8.18 lib/vedeu/boolean.rb
vedeu-0.8.17 lib/vedeu/boolean.rb
vedeu-0.8.16 lib/vedeu/boolean.rb
vedeu-0.8.15 lib/vedeu/boolean.rb
vedeu-0.8.14 lib/vedeu/boolean.rb
vedeu-0.8.13 lib/vedeu/boolean.rb
vedeu-0.8.12 lib/vedeu/boolean.rb
vedeu-0.8.10 lib/vedeu/boolean.rb
vedeu-0.8.9 lib/vedeu/boolean.rb
vedeu-0.8.8 lib/vedeu/boolean.rb
vedeu-0.8.7 lib/vedeu/boolean.rb
vedeu-0.8.6 lib/vedeu/boolean.rb
vedeu-0.8.5 lib/vedeu/boolean.rb
vedeu-0.8.4 lib/vedeu/boolean.rb