class Parsby::Splicer
Public Class Methods
start(label = nil, &b)
click to toggle source
# File lib/parsby.rb, line 89 def self.start(label = nil, &b) m = new p = b.call m p % label if label m.start p end
Public Instance Methods
end(p)
click to toggle source
# File lib/parsby.rb, line 106 def end(p) Parsby.new("splicer.end(#{p.label})") { |c| begin p.parse c ensure c.parsed_ranges.children[0].markers << self end } end
start(p)
click to toggle source
# File lib/parsby.rb, line 96 def start(p) Parsby.new("splicer.start(#{p.label})") { |c| begin p.parse c ensure c.parsed_ranges.splice_to! self end } end