Class: RBS::Annotate::Annotations::Skip
- Inherits:
-
Object
- Object
- RBS::Annotate::Annotations::Skip
- Defined in:
- lib/rbs/annotate/annotations.rb
Instance Attribute Summary collapse
-
#annotation ⇒ Object
readonly
Returns the value of attribute annotation.
-
#skip_children ⇒ Object
readonly
Returns the value of attribute skip_children.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(annotation:, skip_children:) ⇒ Skip
constructor
A new instance of Skip.
Constructor Details
#initialize(annotation:, skip_children:) ⇒ Skip
Returns a new instance of Skip.
7 8 9 10 |
# File 'lib/rbs/annotate/annotations.rb', line 7 def initialize(annotation:, skip_children:) @annotation = annotation @skip_children = skip_children end |
Instance Attribute Details
#annotation ⇒ Object (readonly)
Returns the value of attribute annotation.
5 6 7 |
# File 'lib/rbs/annotate/annotations.rb', line 5 def annotation @annotation end |
#skip_children ⇒ Object (readonly)
Returns the value of attribute skip_children.
5 6 7 |
# File 'lib/rbs/annotate/annotations.rb', line 5 def skip_children @skip_children end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
16 17 18 19 20 |
# File 'lib/rbs/annotate/annotations.rb', line 16 def ==(other) other.is_a?(Skip) && other.skip_children == skip_children && other.annotation == annotation end |
#hash ⇒ Object
12 13 14 |
# File 'lib/rbs/annotate/annotations.rb', line 12 def hash self.class.hash ^ annotation.hash ^ skip_children.hash end |