Sha256: 394ba2e63eec4d46993f0ce8bf4166ab650c5502b5bd3108e5f83eaf9aed20e4

Contents?: true

Size: 486 Bytes

Versions: 3

Compression:

Stored size: 486 Bytes

Contents

# encoding: utf-8

module Selector

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

    include Singleton

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

  end # class Anything

end # module Selector

Version data entries

3 entries across 3 versions & 1 rubygems

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