Class: Steep::Source::LocatedAnnotation
- Inherits:
-
Object
- Object
- Steep::Source::LocatedAnnotation
- Defined in:
- lib/steep/source.rb
Instance Attribute Summary collapse
-
#annotation ⇒ Object
readonly
Returns the value of attribute annotation.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(line:, source:, annotation:) ⇒ LocatedAnnotation
constructor
A new instance of LocatedAnnotation.
Constructor Details
#initialize(line:, source:, annotation:) ⇒ LocatedAnnotation
Returns a new instance of LocatedAnnotation.
8 9 10 11 12 |
# File 'lib/steep/source.rb', line 8 def initialize(line:, source:, annotation:) @line = line @source = source @annotation = annotation end |
Instance Attribute Details
#annotation ⇒ Object (readonly)
Returns the value of attribute annotation.
5 6 7 |
# File 'lib/steep/source.rb', line 5 def annotation @annotation end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
4 5 6 |
# File 'lib/steep/source.rb', line 4 def line @line end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
6 7 8 |
# File 'lib/steep/source.rb', line 6 def source @source end |
Instance Method Details
#==(other) ⇒ Object
14 15 16 17 18 |
# File 'lib/steep/source.rb', line 14 def ==(other) other.is_a?(LocatedAnnotation) && other.line == line && other.annotation == annotation end |