Class: RBS::Types::Union
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rbs/types.rb |
Class Method Summary
- .new(types:, location:) ⇒ Union 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:) ⇒ Union
Instance Attribute Details
#has_classish_type? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/rbs/types.rb', line 760
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 756
def has_self_type? each_type.any? {|type| type.has_self_type? } end
#location (readonly)
[ GitHub ]# File 'lib/rbs/types.rb', line 691
attr_reader :location
#types (readonly)
[ GitHub ]# File 'lib/rbs/types.rb', line 690
attr_reader :types
#with_nonreturn_void? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/rbs/types.rb', line 764
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 733
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 702
alias eql? ==
#free_variables(set = Set.new)
[ GitHub ]#hash
[ GitHub ]# File 'lib/rbs/types.rb', line 704
def hash self.class.hash ^ types.hash end