class RBS::AST::Declarations::Alias
Attributes
annotations[R]
comment[R]
location[R]
name[R]
type[R]
Public Class Methods
new(name:, type:, annotations:, location:, comment:)
click to toggle source
# File rbs-1.4.0/lib/rbs/ast/declarations.rb, line 370 def initialize(name:, type:, annotations:, location:, comment:) @name = name @type = type @annotations = annotations @location = location @comment = comment end
Public Instance Methods
==(other)
click to toggle source
# File rbs-1.4.0/lib/rbs/ast/declarations.rb, line 378 def ==(other) other.is_a?(Alias) && other.name == name && other.type == type end
Also aliased as: eql?
hash()
click to toggle source
# File rbs-1.4.0/lib/rbs/ast/declarations.rb, line 386 def hash self.class.hash ^ name.hash ^ type.hash end
to_json(state = _ = nil)
click to toggle source
# File rbs-1.4.0/lib/rbs/ast/declarations.rb, line 390 def to_json(state = _ = nil) { declaration: :alias, name: name, type: type, annotations: annotations, location: location, comment: comment }.to_json(state) end