class RBS::AST::Declarations::Global
Attributes
Public Class Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 392 def initialize(name:, type:, location:, comment:, annotations: []) @name = name @type = type @location = location @comment = comment @annotations = annotations end
Public Instance Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 400 def ==(other) other.is_a?(Global) && other.name == name && other.type == type end
Also aliased as: eql?
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 408 def hash self.class.hash ^ name.hash ^ type.hash end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 412 def to_json(state = _ = nil) { declaration: :global, name: name, type: type, location: location, comment: comment }.to_json(state) end