class RBS::AST::Declarations::TypeAlias
属性
annotations[R]
comment[R]
location[R]
name[R]
type[R]
type_params[R]
公共类方法
new(name:, type_params:, type:, annotations:, location:, comment:) 点击切换源代码
# File rbs-3.8.0/lib/rbs/ast/declarations.rb, line 312 def initialize(name:, type_params:, type:, annotations:, location:, comment:) @name = name @type_params = type_params @type = type @annotations = annotations @location = location @comment = comment end
公共实例方法
==(other) 点击切换源代码
# File rbs-3.8.0/lib/rbs/ast/declarations.rb, line 321 def ==(other) other.is_a?(TypeAlias) && other.name == name && other.type_params == type_params && other.type == type end
别名: eql?
hash() 点击切换源代码
# File rbs-3.8.0/lib/rbs/ast/declarations.rb, line 330 def hash self.class.hash ^ name.hash ^ type_params.hash ^ type.hash end
to_json(state = _ = nil) 点击切换源代码
# File rbs-3.8.0/lib/rbs/ast/declarations.rb, line 334 def to_json(state = _ = nil) { declaration: :alias, name: name, type_params: type_params, type: type, annotations: annotations, location: location, comment: comment }.to_json(state) end