# File rbs-1.0.4/lib/rbs/ast/members.rb, line 16 def initialize(name,, kind,, types,, annotations,, location,, comment,, overload)) @name = name @kind = kind @types = types @annotations = annotations @location = location @comment = comment @overload = overload ? true : false end
# File rbs-1.0.4/lib/rbs/ast/members.rb, line 26 def ==(other) other.is_a?(MethodDefinition) && other.name == name && other.kind == kind && other.types == types && other.overload == overload end
# File rbs-1.0.4/lib/rbs/ast/members.rb, line 36 def hash self.class.hash ^ name.hash ^ kind.hash ^ types.hash ^ overload.hash end
# File rbs-1.0.4/lib/rbs/ast/members.rb, line 40 def instance? kind == :instance || kind == :singleton_instance end
# File rbs-1.0.4/lib/rbs/ast/members.rb, line 48 def overload? overload end
# File rbs-1.0.4/lib/rbs/ast/members.rb, line 44 def singleton? kind == :singleton || kind == :singleton_instance end
# File rbs-1.0.4/lib/rbs/ast/members.rb, line 64 def to_json(*a) { member: :method_definition, kind: kind, types: types, annotations: annotations, location: location, comment: comment, overload: overload }.to_json(*a) end
# File rbs-1.0.4/lib/rbs/ast/members.rb, line 52 def update(name: self.name, kind: self.kind, types: self.types, annotations: self.annotations, location: self.location, comment: self.comment, overload: self.overload) self.class.new( name: name, kind: kind, types: types, annotations: annotations, location: location, comment: comment, overload: overload ) end