class RBS::AST::Members::MethodDefinition

def ==(other)

def ==(other)
  other.is_a?(MethodDefinition) &&
    other.name == name &&
    other.kind == kind &&
    other.types == types &&
    other.overload == overload &&
    other.visibility == visibility
end

def hash

def hash
  name.hash ^ kind.hash ^ types.hash ^ overload.hash
end

def initialize(name:, kind:, types:, annotations:, location:, comment:, overload:, visibility: nil)

def initialize(name:, kind:, types:, annotations:, location:, comment:, overload:, visibility: nil)
  @name = name
  @kind = kind
  @types = types
  @annotations = annotations
  @location = location
  @comment = comment
  @overload = overload ? true : false
  @visibility = visibility
end

def instance?

def instance?
  kind == :instance || kind == :singleton_instance
end

def overload?

def overload?
  overload
end

def singleton?

def singleton?
  kind == :singleton || kind == :singleton_instance
end

def to_json(state = _ = nil)

def to_json(state = _ = nil)
  {
    member: :method_definition,
    kind: kind,
    types: types,
    annotations: annotations,
    location: location,
    comment: comment,
    overload: overload
  }.to_json(state)
end

def update(name: self.name, kind: self.kind, types: self.types, annotations: self.annotations, location: self.location, comment: self.comment, overload: self.overload, visibility: self.visibility)

def update(name: self.name, kind: self.kind, types: self.types, annotations: self.annotations, location: self.location, comment: self.comment, overload: self.overload, visibility: self.visibility)
  self.class.new(
    name: name,
    kind: kind,
    types: types,
    annotations: annotations,
    location: location,
    comment: comment,
    overload: overload,
    visibility: visibility
  )
end