Class: RBS::Annotate::Annotations::Skip
- Inherits:
-
Object
- Object
- RBS::Annotate::Annotations::Skip
- Defined in:
- sig/annotate/annotations.rbs,
lib/rbs/annotate/annotations.rb
Overview
Skip annotation allows skipping generating annotation of a subject.
%a{annotate:rdoc:skip}
%a{annotate:rdoc:skip:all}
Instance Attribute Summary collapse
-
#annotation ⇒ AST::Annotation
readonly
Returns the value of attribute annotation.
-
#skip_children ⇒ Boolean
readonly
Returns the value of attribute skip_children.
Instance Method Summary collapse
- #==(other) ⇒ Boolean (also: #eql?)
- #hash ⇒ Integer
-
#initialize(annotation:, skip_children:) ⇒ Skip
constructor
A new instance of Skip.
Constructor Details
#initialize(annotation:, skip_children:) ⇒ Skip
Returns a new instance of Skip.
9 10 11 12 |
# File 'lib/rbs/annotate/annotations.rb', line 9 def initialize(annotation:, skip_children:) @annotation = annotation @skip_children = skip_children end |
Instance Attribute Details
#annotation ⇒ AST::Annotation (readonly)
Returns the value of attribute annotation.
7 8 9 |
# File 'lib/rbs/annotate/annotations.rb', line 7 def annotation @annotation end |
#skip_children ⇒ Boolean (readonly)
Returns the value of attribute skip_children.
7 8 9 |
# File 'lib/rbs/annotate/annotations.rb', line 7 def skip_children @skip_children end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
18 19 20 21 22 |
# File 'lib/rbs/annotate/annotations.rb', line 18 def ==(other) other.is_a?(Skip) && other.skip_children == skip_children && other.annotation == annotation end |
#hash ⇒ Integer
14 15 16 |
# File 'lib/rbs/annotate/annotations.rb', line 14 def hash self.class.hash ^ annotation.hash ^ skip_children.hash end |