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

Helpers::Private

Instance Method Summary collapse

Methods included from Helpers

#abstract!, #final!, #interface!, #mixes_in_class_methods, #requires_ancestor, #sealed!

Methods included from Sig

#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