Sha256: ea230c68efd110cf81440266cef508250a0a54764d3bb64ada6021067005aee8

Contents?: true

Size: 487 Bytes

Versions: 3

Compression:

Stored size: 487 Bytes

Contents

# encoding: utf-8

module Selector

  # The condition that accepts any value
  #
  # @example (see #[])
  #
  class Nothing < Condition

    include Singleton

    # @!method [](value)
    # Returns false
    #
    # @example
    #   condition = Selector::Nothing.instance # singleton
    #   condition[:foo] # => false
    #
    # @param (see Selector::Condition#[])
    #
    # @return [false]
    #
    def [](_value)
      false
    end

  end # class Nothing

end # module Selector

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
selector-0.0.3 lib/selector/nothing.rb
selector-0.0.2 lib/selector/nothing.rb
selector-0.0.1 lib/selector/nothing.rb