Class: RBS::Annotate::Annotations::Source
- Inherits:
-
Object
- Object
- RBS::Annotate::Annotations::Source
- Defined in:
- lib/rbs/annotate/annotations.rb
Instance Attribute Summary collapse
-
#annotation ⇒ Object
readonly
Returns the value of attribute annotation.
-
#include_source ⇒ Object
readonly
Returns the value of attribute include_source.
-
#skip_source ⇒ Object
readonly
Returns the value of attribute skip_source.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(annotation:, include: nil, skip: nil) ⇒ Source
constructor
A new instance of Source.
Constructor Details
#initialize(annotation:, include: nil, skip: nil) ⇒ Source
Returns a new instance of Source.
29 30 31 32 33 |
# File 'lib/rbs/annotate/annotations.rb', line 29 def initialize(annotation:, include: nil, skip: nil) @annotation = annotation @include_source = include @skip_source = skip end |
Instance Attribute Details
#annotation ⇒ Object (readonly)
Returns the value of attribute annotation.
26 27 28 |
# File 'lib/rbs/annotate/annotations.rb', line 26 def annotation @annotation end |
#include_source ⇒ Object (readonly)
Returns the value of attribute include_source.
27 28 29 |
# File 'lib/rbs/annotate/annotations.rb', line 27 def include_source @include_source end |
#skip_source ⇒ Object (readonly)
Returns the value of attribute skip_source.
27 28 29 |
# File 'lib/rbs/annotate/annotations.rb', line 27 def skip_source @skip_source end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
39 40 41 42 43 44 |
# File 'lib/rbs/annotate/annotations.rb', line 39 def ==(other) other.is_a?(Source) && other.annotation == annotation && other.include_source == include_source && other.skip_source == skip_source end |
#hash ⇒ Object
35 36 37 |
# File 'lib/rbs/annotate/annotations.rb', line 35 def hash self.class.hash ^ annotation.hash ^ include_source.hash ^ skip_source.hash end |