Module: T::Generic
- Includes:
- Kernel, Helpers
- Defined in:
- lib/types/generic.rb
Overview
Use as a mixin with extend (‘extend T::Generic`).
Constant Summary
Constants included from Helpers
Instance Method Summary collapse
-
#[](*types) ⇒ Object
Class/Module Helpers ###.
- #has_attached_class!(variance = :invariant, &blk) ⇒ Object
- #type_member(variance = :invariant, &blk) ⇒ Object
- #type_template(variance = :invariant, &blk) ⇒ Object
Methods included from Helpers
#abstract!, #final!, #interface!, #mixes_in_class_methods, #requires_ancestor, #sealed!
Methods included from Sig
Instance Method Details
#[](*types) ⇒ Object
Class/Module Helpers ###
11 12 13 |
# File 'lib/types/generic.rb', line 11 def [](*types) self end |
#has_attached_class!(variance = :invariant, &blk) ⇒ Object
23 |
# File 'lib/types/generic.rb', line 23 def has_attached_class!(variance=:invariant, &blk); end |
#type_member(variance = :invariant, &blk) ⇒ Object
15 16 17 |
# File 'lib/types/generic.rb', line 15 def type_member(variance=:invariant, &blk) T::Types::TypeMember.new(variance) end |
#type_template(variance = :invariant, &blk) ⇒ Object
19 20 21 |
# File 'lib/types/generic.rb', line 19 def type_template(variance=:invariant, &blk) T::Types::TypeTemplate.new(variance) end |