Class: CodeModels::SourceInfo
- Inherits:
-
Object
- Object
- CodeModels::SourceInfo
- Defined in:
- lib/codemodels/source_info.rb
Instance Attribute Summary collapse
-
#artifact ⇒ Object
Returns the value of attribute artifact.
-
#position ⇒ Object
Returns the value of attribute position.
Instance Method Summary collapse
- #begin_line ⇒ Object
- #begin_point=(data) ⇒ Object
- #end_line ⇒ Object
- #end_point=(data) ⇒ Object
- #to_code ⇒ Object
Instance Attribute Details
#artifact ⇒ Object
Returns the value of attribute artifact.
102 103 104 |
# File 'lib/codemodels/source_info.rb', line 102 def artifact @artifact end |
#position ⇒ Object
Returns the value of attribute position.
103 104 105 |
# File 'lib/codemodels/source_info.rb', line 103 def position @position end |
Instance Method Details
#begin_line ⇒ Object
121 122 123 |
# File 'lib/codemodels/source_info.rb', line 121 def begin_line position.begin_point.line end |
#begin_point=(data) ⇒ Object
109 110 111 112 113 |
# File 'lib/codemodels/source_info.rb', line 109 def begin_point=(data) point = data_to_point(data) @position = SourcePosition.new unless @position @position.begin_point = point end |
#end_line ⇒ Object
125 126 127 |
# File 'lib/codemodels/source_info.rb', line 125 def end_line position.end_point.line end |
#end_point=(data) ⇒ Object
115 116 117 118 119 |
# File 'lib/codemodels/source_info.rb', line 115 def end_point=(data) point = data_to_point(data) @position = SourcePosition.new unless @position @position.end_point = point end |
#to_code ⇒ Object
105 106 107 |
# File 'lib/codemodels/source_info.rb', line 105 def to_code raise "Unimplemented" end |