Class: RBS::Types::Tuple
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rbs/types.rb |
Class Method Summary
- .new(types:, location:) ⇒ Tuple constructor
Instance Attribute Summary
- #has_classish_type? ⇒ Boolean readonly
- #has_self_type? ⇒ Boolean readonly
- #location readonly
- #types readonly
- #with_nonreturn_void? ⇒ Boolean readonly
Instance Method Summary
Constructor Details
.new(types:, location:) ⇒ Tuple
Instance Attribute Details
#has_classish_type? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/rbs/types.rb', line 508
def has_classish_type? each_type.any? {|type| type.has_classish_type? } end
#has_self_type? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/rbs/types.rb', line 504
def has_self_type? each_type.any? {|type| type.has_self_type? } end
#location (readonly)
[ GitHub ]# File 'lib/rbs/types.rb', line 436
attr_reader :location
#types (readonly)
[ GitHub ]# File 'lib/rbs/types.rb', line 435
attr_reader :types
#with_nonreturn_void? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/rbs/types.rb', line 512
def with_nonreturn_void? each_type.any? {|type| type.with_nonreturn_void? } end
Instance Method Details
#==(other) Also known as: #eql?
[ GitHub ]#each_type(&block)
[ GitHub ]# File 'lib/rbs/types.rb', line 478
def each_type(&block) if block types.each(&block) else enum_for :each_type end end
#eql?(other)
[ GitHub ]# File 'lib/rbs/types.rb', line 447
alias eql? ==
#free_variables(set = Set.new)
[ GitHub ]#hash
[ GitHub ]# File 'lib/rbs/types.rb', line 449
def hash self.class.hash ^ types.hash end