class Lucid::AST::Location
Attributes
file[R]
line[R]
Public Class Methods
new(file, line)
click to toggle source
# File lib/lucid/ast/location.rb, line 7 def initialize(file, line) @file = file || raise(ArgumentError, "file is mandatory") @line = line || raise(ArgumentError, "line is mandatory") end
Public Instance Methods
on_line(new_line)
click to toggle source
# File lib/lucid/ast/location.rb, line 16 def on_line(new_line) Location.new(file, new_line) end
to_s()
click to toggle source
# File lib/lucid/ast/location.rb, line 12 def to_s "#{file}:#{line}" end