class RBS::AST::Members::MethodDefinition::Overload
属性
annotations[R]
method_type[R]
公共类方法
new(method_type:, annotations:) 点击切换源代码
# File rbs-3.8.0/lib/rbs/ast/members.rb, line 13 def initialize(method_type:, annotations:) @method_type = method_type @annotations = annotations end
公共实例方法
==(other) 点击切换源代码
# File rbs-3.8.0/lib/rbs/ast/members.rb, line 18 def ==(other) other.is_a?(Overload) && other.method_type == method_type && other.annotations == annotations end
也别名为: eql?
hash() 点击切换源代码
# File rbs-3.8.0/lib/rbs/ast/members.rb, line 22 def hash method_type.hash ^ annotations.hash end
sub(subst) 点击切换源代码
# File rbs-3.8.0/lib/rbs/ast/members.rb, line 32 def sub(subst) update(method_type: self.method_type.sub(subst)) end
to_json(state = _ = nil) 点击切换源代码
# File rbs-3.8.0/lib/rbs/ast/members.rb, line 36 def to_json(state = _ = nil) { annotations: annotations, method_type: method_type }.to_json(state) end
update(annotations: self.annotations, method_type: self.method_type) 点击切换源代码
# File rbs-3.8.0/lib/rbs/ast/members.rb, line 28 def update(annotations: self.annotations, method_type: self.method_type) Overload.new(annotations: annotations, method_type: method_type) end