Sha256: fb020f432f663375b2fbd6aa3f3cfdfd2382d16649524f100be5bba52f6b721d

Contents?: true

Size: 365 Bytes

Versions: 12

Compression:

Stored size: 365 Bytes

Contents

# encoding: utf-8

module Mixture
  module Types
    # An enumerable.  This is any value that inherits `Enumerable`.
    class Enumerable < Object
      options[:primitive] = ::Enumerable
      constraint do |value|
        # include Enumerable adds Enumerable to the ancestors list.
        value.class.ancestors.include?(::Enumerable)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mixture-0.6.2 lib/mixture/types/enumerable.rb
mixture-0.6.1 lib/mixture/types/enumerable.rb
mixture-0.6.0 lib/mixture/types/enumerable.rb
mixture-0.5.1 lib/mixture/types/enumerable.rb
mixture-0.5.0 lib/mixture/types/enumerable.rb
mixture-0.4.0 lib/mixture/types/enumerable.rb
mixture-0.3.6 lib/mixture/types/enumerable.rb
mixture-0.3.5 lib/mixture/types/enumerable.rb
mixture-0.3.4 lib/mixture/types/enumerable.rb
mixture-0.3.2 lib/mixture/types/enumerable.rb
mixture-0.3.1 lib/mixture/types/enumerable.rb
mixture-0.3.0 lib/mixture/types/enumerable.rb