Class: XDry::BaseFileRef
- Inherits:
-
Object
- Object
- XDry::BaseFileRef
- Defined in:
- lib/xdry/parsing/pos.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#positions ⇒ Object
readonly
Returns the value of attribute positions.
Instance Method Summary collapse
- #add_pos!(pos) ⇒ Object
- #fixup_positions!(after_line_no, offset) ⇒ Object
-
#initialize ⇒ BaseFileRef
constructor
A new instance of BaseFileRef.
Constructor Details
#initialize ⇒ BaseFileRef
Returns a new instance of BaseFileRef.
8 9 10 |
# File 'lib/xdry/parsing/pos.rb', line 8 def initialize @positions = [] end |
Instance Attribute Details
#positions ⇒ Object (readonly)
Returns the value of attribute positions.
6 7 8 |
# File 'lib/xdry/parsing/pos.rb', line 6 def positions @positions end |
Instance Method Details
#add_pos!(pos) ⇒ Object
12 13 14 |
# File 'lib/xdry/parsing/pos.rb', line 12 def add_pos! pos @positions << pos end |
#fixup_positions!(after_line_no, offset) ⇒ Object
16 17 18 |
# File 'lib/xdry/parsing/pos.rb', line 16 def fixup_positions! after_line_no, offset @positions.each { |pos| pos.fixup! after_line_no, offset } end |