123456789_123456789_123456789_123456789_123456789_

Class: RBS::Annotate::Annotations::Skip

Relationships & Source Files
Inherits: Object
Defined in: lib/rbs/annotate/annotations.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(annotation:, skip_children:) ⇒ Skip

[ GitHub ]

  
# File 'lib/rbs/annotate/annotations.rb', line 9

def initialize(annotation:, skip_children:)
  @annotation = annotation
  @skip_children = skip_children
end

Instance Attribute Details

#annotation (readonly)

[ GitHub ]

  
# File 'lib/rbs/annotate/annotations.rb', line 7

attr_reader :annotation, :skip_children

#skip_children (readonly)

[ GitHub ]

  
# File 'lib/rbs/annotate/annotations.rb', line 7

attr_reader :annotation, :skip_children

Instance Method Details

#==(other) Also known as: #eql?

[ GitHub ]

  
# File 'lib/rbs/annotate/annotations.rb', line 18

def ==(other)
  other.is_a?(Skip) &&
    other.skip_children == skip_children &&
    other.annotation == annotation
end

#eql?(other)

Alias for #==.

[ GitHub ]

  
# File 'lib/rbs/annotate/annotations.rb', line 24

alias eql? ==

#hash

[ GitHub ]

  
# File 'lib/rbs/annotate/annotations.rb', line 14

def hash
  self.class.hash ^ annotation.hash ^ skip_children.hash
end