Class: Axiom::Types::Collection
- Defined in:
- lib/axiom/types/collection.rb
Overview
Represents a collection type
Class Method Summary collapse
-
.finalize ⇒ Class<Axiom::Types::Collection>
private
Finalize by setting up constraints for the member.
-
.infer(object) ⇒ Class<Axiom::Types::Collection>?
Infer the type of the object.
Methods inherited from Object
Methods inherited from Type
anonymous?, base, constraint, include?, includes, new
Methods included from Options
Class Method Details
.finalize ⇒ Class<Axiom::Types::Collection>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Finalize by setting up constraints for the member
57 58 59 60 61 62 |
# File 'lib/axiom/types/collection.rb', line 57 def self.finalize return self if frozen? member_type.finalize matches_member_type super end |
.infer(object) ⇒ Class<Axiom::Types::Collection>?
Infer the type of the object
43 44 45 46 47 48 49 50 |
# File 'lib/axiom/types/collection.rb', line 43 def self.infer(object) case object when primitive infer_from_primitive_instance(object) else super end end |