class PMLCode::Source
Constants
- PATTERN
Attributes
line[R]
path[R]
Public Class Methods
new(path, line)
click to toggle source
# File lib/pmlcode/source.rb, line 12 def initialize(path, line) @path = File.expand_path(path) @line = line end
parse(text)
click to toggle source
# File lib/pmlcode/source.rb, line 5 def self.parse(text) if (match = text.match(PATTERN)) new(match[:path], match[:line] ? Integer(match[:line]) : nil) end end
Public Instance Methods
missing?()
click to toggle source
# File lib/pmlcode/source.rb, line 17 def missing? !File.exists?(@path) end
to_s()
click to toggle source
# File lib/pmlcode/source.rb, line 21 def to_s [@path, @line].join(":") end