Class: SourceAnnotationExtractor::Annotation

Inherits:
Struct
  • Object
show all
Defined in:
lib/source_annotation_extractor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



2
3
4
# File 'lib/source_annotation_extractor.rb', line 2

def line
  @line
end

#tagObject

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



2
3
4
# File 'lib/source_annotation_extractor.rb', line 2

def tag
  @tag
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



2
3
4
# File 'lib/source_annotation_extractor.rb', line 2

def text
  @text
end

Instance Method Details

#to_s(options = {}) ⇒ Object



3
4
5
6
7
# File 'lib/source_annotation_extractor.rb', line 3

def to_s(options={})
  s = "[%3d] " % line
  s << "[#{tag}] " if options[:tag]
  s << text
end