In Files

  • rbs-1.0.4/lib/rbs/ast/declarations.rb
  • rbs-1.0.4/lib/rbs/environment.rb

Class/Module Index [+]

Quicksearch

RBS::AST::Declarations::Module

Attributes

annotations[R]
comment[R]
location[R]
members[R]
name[R]
self_types[R]
type_params[R]

Public Class Methods

new(name:, type_params:, members:, self_types:, annotations:, location:, comment:) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/ast/declarations.rb, line 265
def initialize(name,, type_params,, members,, self_types,, annotations,, location,, comment))
  @name = name
  @type_params = type_params
  @self_types = self_types
  @members = members
  @annotations = annotations
  @location = location
  @comment = comment
end
            

Public Instance Methods

==(other) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/ast/declarations.rb, line 275
def ==(other)
  other.is_a?(Module) &&
    other.name == name &&
    other.type_params == type_params &&
    other.self_types == self_types &&
    other.members == members
end
            
Also aliased as: eql?
eql?(other) click to toggle source
Alias for: ==
hash() click to toggle source
 
               # File rbs-1.0.4/lib/rbs/ast/declarations.rb, line 285
def hash
  self.class.hash ^ name.hash ^ type_params.hash ^ self_types.hash ^ members.hash
end
            
to_json(*a) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/ast/declarations.rb, line 289
def to_json(*a)
  {
    declaration: :module,
    name: name,
    type_params: type_params,
    members: members,
    self_types: self_types,
    annotations: annotations,
    location: location,
    comment: comment
  }.to_json(*a)
end