Class: AnnotateRb::ModelAnnotator::SingleFileAnnotatorInstruction
- Inherits:
-
Object
- Object
- AnnotateRb::ModelAnnotator::SingleFileAnnotatorInstruction
- 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
-
#annotation ⇒ Object
readonly
Returns the value of attribute annotation.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#model_class_name ⇒ Object
readonly
Returns the value of attribute model_class_name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
-
#initialize(file, annotation, position, options, model_class_name: nil) ⇒ SingleFileAnnotatorInstruction
constructor
A new instance of SingleFileAnnotatorInstruction.
Constructor Details
#initialize(file, annotation, position, options, model_class_name: nil) ⇒ SingleFileAnnotatorInstruction
Returns a new instance of SingleFileAnnotatorInstruction.
7 8 9 10 11 12 13 |
# File 'lib/annotate_rb/model_annotator/single_file_annotator_instruction.rb', line 7 def initialize(file, annotation, position, , model_class_name: nil) @file = file # Path to file @annotation = annotation # Annotation string @position = position # Position in the file where to write the annotation to @options = @model_class_name = model_class_name # Short class name; set for the model file itself, nil for related files end |
Instance Attribute Details
#annotation ⇒ Object (readonly)
Returns the value of attribute annotation.
15 16 17 |
# File 'lib/annotate_rb/model_annotator/single_file_annotator_instruction.rb', line 15 def annotation @annotation end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
15 16 17 |
# File 'lib/annotate_rb/model_annotator/single_file_annotator_instruction.rb', line 15 def file @file end |
#model_class_name ⇒ Object (readonly)
Returns the value of attribute model_class_name.
15 16 17 |
# File 'lib/annotate_rb/model_annotator/single_file_annotator_instruction.rb', line 15 def model_class_name @model_class_name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
15 16 17 |
# File 'lib/annotate_rb/model_annotator/single_file_annotator_instruction.rb', line 15 def @options end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
15 16 17 |
# File 'lib/annotate_rb/model_annotator/single_file_annotator_instruction.rb', line 15 def position @position end |