class RBS::AST::Members::MethodDefinition::Overload
Attributes
Public Class Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/members.rb, line 13 def initialize(method_type:, annotations:) @method_type = method_type @annotations = annotations end
Public Instance Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/members.rb, line 18 def ==(other) other.is_a?(Overload) && other.method_type == method_type && other.annotations == annotations end
Also aliased as: eql?
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/members.rb, line 22 def hash method_type.hash ^ annotations.hash end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/members.rb, line 32 def sub(subst) return self if subst.empty? update(method_type: self.method_type.sub(subst)) end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/members.rb, line 38 def to_json(state = _ = nil) { annotations: annotations, method_type: method_type }.to_json(state) end
Source
# File bundled-src/rbs-3.10.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