Class: RBS::Types::Optional
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rbs/types.rb |
Class Method Summary
- .new(type:, location:) ⇒ Optional constructor
Instance Attribute Summary
- #has_classish_type? ⇒ Boolean readonly
- #has_self_type? ⇒ Boolean readonly
- #location readonly
- #type readonly
- #with_nonreturn_void? ⇒ Boolean readonly
Instance Method Summary
Constructor Details
.new(type:, location:) ⇒ Optional
Instance Attribute Details
#has_classish_type? ⇒ Boolean
(readonly)
[ GitHub ]
#has_self_type? ⇒ Boolean
(readonly)
[ GitHub ]
#location (readonly)
[ GitHub ]# File 'lib/rbs/types.rb', line 628
attr_reader :location
#type (readonly)
[ GitHub ]# File 'lib/rbs/types.rb', line 627
attr_reader :type
#with_nonreturn_void? ⇒ Boolean
(readonly)
[ GitHub ]
Instance Method Details
#==(other) Also known as: #eql?
[ GitHub ]#each_type
[ GitHub ]# File 'lib/rbs/types.rb', line 671
def each_type if block_given? yield type else enum_for :each_type end end
#eql?(other)
[ GitHub ]# File 'lib/rbs/types.rb', line 639
alias eql? ==
#free_variables(set = Set.new)
[ GitHub ]#hash
[ GitHub ]# File 'lib/rbs/types.rb', line 641
def hash self.class.hash ^ type.hash end