class RBS::AST::Members::MethodDefinition
def ==(other)
def ==(other) other.is_a?(MethodDefinition) && other.name == name && other.kind == kind && other.overloads == overloads && other.overloading? == overloading? && other.visibility == visibility end
def hash
def hash name.hash ^ kind.hash ^ overloads.hash ^ overloading?.hash ^ visibility.hash end
def initialize(name:, kind:, overloads:, annotations:, location:, comment:, overloading:, visibility:)
def initialize(name:, kind:, overloads:, annotations:, location:, comment:, overloading:, visibility:) @name = name @kind = kind @overloads = overloads @annotations = annotations @location = location @comment = comment @overloading = overloading @visibility = visibility end
def instance?
def instance? kind == :instance || kind == :singleton_instance end
def overloading?
def overloading? overloading end
def singleton?
def singleton? kind == :singleton || kind == :singleton_instance end
def to_json(state = _ = nil)
def to_json(state = _ = nil) { member: :method_definition, name: name, kind: kind, overloads: overloads, annotations: annotations, location: location, comment: comment, overloading: overloading?, visibility: visibility }.to_json(state) end
def update(name: self.name, kind: self.kind, overloads: self.overloads, annotations: self.annotations, location: self.location, comment: self.comment, overloading: self.overloading?, visibility: self.visibility)
def update(name: self.name, kind: self.kind, overloads: self.overloads, annotations: self.annotations, location: self.location, comment: self.comment, overloading: self.overloading?, visibility: self.visibility) self.class.new( name: name, kind: kind, overloads: overloads, annotations: annotations, location: location, comment: comment, overloading: overloading, visibility: visibility ) end