Sha256: 418588a08ba14419a045a06e686a0444356e5e9452840721681cdadb8783dafb

Contents?: true

Size: 321 Bytes

Versions: 8

Compression:

Stored size: 321 Bytes

Contents

module Praxis

  class Collection

    # checks if +type+ is a MediaType, and if so, if it has an inner
    # Collection class defined
    def self.of(type)
      if type < Attributor::Type && defined?(type::Collection)
        return type::Collection
      end

      Attributor::Collection.of(type)
    end

  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
praxis-0.13.0 lib/praxis/types/collection.rb
praxis-0.11.2 lib/praxis/types/collection.rb
praxis-0.11.1 lib/praxis/types/collection.rb
praxis-0.11 lib/praxis/types/collection.rb
praxis-0.11pre lib/praxis/types/collection.rb
praxis-0.10.1 lib/praxis/types/collection.rb
praxis-0.10.0 lib/praxis/types/collection.rb
praxis-0.9 lib/praxis/types/collection.rb