Class: AnnotateRb::ModelAnnotator::SingleFileAnnotatorInstruction

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

Overview

A plain old Ruby object (PORO) that contains all necessary information for SingleFileAnnotator

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, annotation, position, options) ⇒ SingleFileAnnotatorInstruction

Returns a new instance of SingleFileAnnotatorInstruction.



7
8
9
10
11
12
# File 'lib/annotate_rb/model_annotator/single_file_annotator_instruction.rb', line 7

def initialize(file, annotation, position, options)
  @file = file # Path to file
  @annotation = annotation # Annotation string
  @position = position # Position in the file where to write the annotation to
  @options = options
end

Instance Attribute Details

#annotationObject (readonly)

Returns the value of attribute annotation.



14
15
16
# File 'lib/annotate_rb/model_annotator/single_file_annotator_instruction.rb', line 14

def annotation
  @annotation
end

#fileObject (readonly)

Returns the value of attribute file.



14
15
16
# File 'lib/annotate_rb/model_annotator/single_file_annotator_instruction.rb', line 14

def file
  @file
end

#optionsObject (readonly)

Returns the value of attribute options.



14
15
16
# File 'lib/annotate_rb/model_annotator/single_file_annotator_instruction.rb', line 14

def options
  @options
end

#positionObject (readonly)

Returns the value of attribute position.



14
15
16
# File 'lib/annotate_rb/model_annotator/single_file_annotator_instruction.rb', line 14

def position
  @position
end