Class: RBS::Annotate::Annotations::Skip
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rbs/annotate/annotations.rb |
Class Method Summary
- .new(annotation:, skip_children:) ⇒ Skip constructor
Instance Attribute Summary
- #annotation readonly
- #skip_children readonly
Instance Method Summary
- #==(other) (also: #eql?)
-
#eql?(other)
Alias for #==.
- #hash
Constructor Details
.new(annotation:, skip_children:) ⇒ Skip
# 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 #==.
# 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