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 607
attr_reader :location
#type (readonly)
[ GitHub ]# File 'lib/rbs/types.rb', line 606
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 650
def each_type if block_given? yield type else enum_for :each_type end end
#eql?(other)
[ GitHub ]# File 'lib/rbs/types.rb', line 618
alias eql? ==
#free_variables(set = Set.new)
[ GitHub ]#hash
[ GitHub ]# File 'lib/rbs/types.rb', line 620
def hash self.class.hash ^ type.hash end