Class: AnnotateRb::ModelAnnotator::FileParser::ParsedFileResult

Inherits:
Object
  • Object
show all
Defined in:
lib/annotate_rb/model_annotator/file_parser/parsed_file_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(has_annotations:, has_skip_string:, annotations_changed:, annotations:, annotations_with_whitespace:, has_leading_whitespace:, has_trailing_whitespace:, annotation_position:, starts:, ends:) ⇒ ParsedFileResult

Returns a new instance of ParsedFileResult.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/annotate_rb/model_annotator/file_parser/parsed_file_result.rb', line 7

def initialize(
  has_annotations:,
  has_skip_string:,
  annotations_changed:,
  annotations:,
  annotations_with_whitespace:,
  has_leading_whitespace:,
  has_trailing_whitespace:,
  annotation_position:,
  starts:,
  ends:
)
  @has_annotations = has_annotations
  @has_skip_string = has_skip_string
  @annotations_changed = annotations_changed
  @annotations = annotations
  @annotations_with_whitespace = annotations_with_whitespace
  @has_leading_whitespace = has_leading_whitespace
  @has_trailing_whitespace = has_trailing_whitespace
  @annotation_position = annotation_position
  @starts = starts
  @ends = ends
end

Instance Attribute Details

#annotation_positionObject (readonly)

Returns the value of attribute annotation_position.



31
32
33
# File 'lib/annotate_rb/model_annotator/file_parser/parsed_file_result.rb', line 31

def annotation_position
  @annotation_position
end

#annotationsObject (readonly)

Returns the value of attribute annotations.



31
32
33
# File 'lib/annotate_rb/model_annotator/file_parser/parsed_file_result.rb', line 31

def annotations
  @annotations
end

#annotations_with_whitespaceObject (readonly)

Returns annotations with new line before and after if they exist



34
35
36
# File 'lib/annotate_rb/model_annotator/file_parser/parsed_file_result.rb', line 34

def annotations_with_whitespace
  @annotations_with_whitespace
end

#endsObject (readonly)

Returns the value of attribute ends.



31
32
33
# File 'lib/annotate_rb/model_annotator/file_parser/parsed_file_result.rb', line 31

def ends
  @ends
end

#startsObject (readonly)

Returns the value of attribute starts.



31
32
33
# File 'lib/annotate_rb/model_annotator/file_parser/parsed_file_result.rb', line 31

def starts
  @starts
end

Instance Method Details

#annotations_changed?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/annotate_rb/model_annotator/file_parser/parsed_file_result.rb', line 36

def annotations_changed?
  @annotations_changed
end

#has_annotations?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/annotate_rb/model_annotator/file_parser/parsed_file_result.rb', line 40

def has_annotations?
  @has_annotations
end

#has_leading_whitespace?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/annotate_rb/model_annotator/file_parser/parsed_file_result.rb', line 48

def has_leading_whitespace?
  @has_leading_whitespace
end

#has_skip_string?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/annotate_rb/model_annotator/file_parser/parsed_file_result.rb', line 44

def has_skip_string?
  @has_skip_string
end

#has_trailing_whitespace?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/annotate_rb/model_annotator/file_parser/parsed_file_result.rb', line 52

def has_trailing_whitespace?
  @has_trailing_whitespace
end