class RBS::AST::Declarations::Interface
Attributes
Public Class Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 258 def initialize(name:, type_params:, members:, annotations:, location:, comment:) @name = name @type_params = type_params @members = members @annotations = annotations @location = location @comment = comment end
Public Instance Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 278 def ==(other) other.is_a?(Interface) && other.name == name && other.type_params == type_params && other.members == members end
Also aliased as: eql?
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 287 def hash self.class.hash ^ type_params.hash ^ members.hash end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 291 def to_json(state = _ = nil) { declaration: :interface, name: name, type_params: type_params, members: members, annotations: annotations, location: location, comment: comment }.to_json(state) end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 267 def update(name: self.name, type_params: self.type_params, members: self.members, annotations: self.annotations, location: self.location, comment: self.comment) self.class.new( name: name, type_params: type_params, members: members, annotations: annotations, location: location, comment: comment ) end