Class: CodeModels::EmbeddedArtifact
- Inherits:
-
AbstractArtifact
- Object
- AbstractArtifact
- CodeModels::EmbeddedArtifact
- Defined in:
- lib/codemodels/source_info.rb
Instance Attribute Summary collapse
-
#host_artifact ⇒ Object
Returns the value of attribute host_artifact.
-
#position_in_host ⇒ Object
Returns the value of attribute position_in_host.
Instance Method Summary collapse
Methods inherited from AbstractArtifact
#point_to_absolute, #position_to_absolute
Instance Attribute Details
#host_artifact ⇒ Object
Returns the value of attribute host_artifact.
27 28 29 |
# File 'lib/codemodels/source_info.rb', line 27 def host_artifact @host_artifact end |
#position_in_host ⇒ Object
Returns the value of attribute position_in_host.
28 29 30 |
# File 'lib/codemodels/source_info.rb', line 28 def position_in_host @position_in_host end |
Instance Method Details
#absolute_start ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/codemodels/source_info.rb', line 30 def absolute_start p = host_artifact.absolute_start p.line += position_in_host.begin_point.line-1 if position_in_host.begin_point.line==1 # if I am on the first line of my "host", its column # matters because there are not newlines to reset the column # counter p.column += position_in_host.begin_point.column-1 else p.column = position_in_host.begin_point.column end p end |