Class: RBS::Annotate::Annotations::Source
| Relationships & Source Files | |
| Inherits: | Object | 
| Defined in: | lib/rbs/annotate/annotations.rb | 
Class Method Summary
Instance Attribute Summary
- #annotation readonly
- #include_source readonly
- #skip_source readonly
Instance Method Summary
- #==(other) (also: #eql?)
- 
    
      #eql?(other)  
    
    Alias for #==. 
- #hash
Constructor Details
    .new(annotation:, include: nil, skip: nil)  ⇒ Source 
  
# File 'lib/rbs/annotate/annotations.rb', line 31
def initialize(annotation:, include: nil, skip: nil) @annotation = annotation @include_source = include @skip_source = skip end
Instance Attribute Details
#annotation (readonly)
[ GitHub ]# File 'lib/rbs/annotate/annotations.rb', line 28
attr_reader :annotation
#include_source (readonly)
[ GitHub ]# File 'lib/rbs/annotate/annotations.rb', line 29
attr_reader :include_source, :skip_source
#skip_source (readonly)
[ GitHub ]# File 'lib/rbs/annotate/annotations.rb', line 29
attr_reader :include_source, :skip_source
Instance Method Details
#==(other) Also known as: #eql?
[ GitHub ]# File 'lib/rbs/annotate/annotations.rb', line 41
def ==(other) other.is_a?(Source) && other.annotation == annotation && other.include_source == include_source && other.skip_source == skip_source end
#eql?(other)
Alias for #==.
# File 'lib/rbs/annotate/annotations.rb', line 48
alias eql? ==
#hash
[ GitHub ]# File 'lib/rbs/annotate/annotations.rb', line 37
def hash self.class.hash ^ annotation.hash ^ include_source.hash ^ skip_source.hash end