Class: RBS::TypeName
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rbs/type_name.rb |
Class Method Summary
- .new(namespace:, name:) ⇒ TypeName constructor
Instance Attribute Summary
- #absolute? ⇒ Boolean readonly
- #alias? ⇒ Boolean readonly
- #class? ⇒ Boolean readonly
- #interface? ⇒ Boolean readonly
- #kind readonly
- #name readonly
- #namespace readonly
Instance Method Summary
- #==(other) (also: #eql?)
- #absolute!
-
#eql?(other)
Alias for #==.
- #hash
- #relative!
- #to_json(state = _ = nil)
- #to_namespace
- #to_s
- #with_prefix(namespace)
Constructor Details
.new(namespace:, name:) ⇒ TypeName
Instance Attribute Details
#absolute? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/rbs/type_name.rb', line 57
def absolute? namespace.absolute? end
#alias? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/rbs/type_name.rb', line 49
def alias? kind == :alias end
#class? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/rbs/type_name.rb', line 45
def class? kind == :class end
#interface? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/rbs/type_name.rb', line 65
def interface? kind == :interface end
#kind (readonly)
[ GitHub ]# File 'lib/rbs/type_name.rb', line 5
attr_reader :kind
#name (readonly)
[ GitHub ]# File 'lib/rbs/type_name.rb', line 4
attr_reader :name
#namespace (readonly)
[ GitHub ]# File 'lib/rbs/type_name.rb', line 3
attr_reader :namespace
Instance Method Details
#==(other) Also known as: #eql?
[ GitHub ]#absolute!
[ GitHub ]#eql?(other)
Alias for #==.
# File 'lib/rbs/type_name.rb', line 27
alias eql? ==
#hash
[ GitHub ]#relative!
[ GitHub ]#to_json(state = _ = nil)
[ GitHub ]# File 'lib/rbs/type_name.rb', line 37
def to_json(state = _ = nil) to_s.to_json(state) end