class Aio::Text::LineString
Attributes
content[RW]
line[RW]
Public Instance Methods
match_block(reg, cont, line) { |block| ... }
click to toggle source
获得区块 并且获得所在的行数
# File lib/aio/core/text/line_string.rb, line 13 def match_block(reg, cont, line) block = Block.new(reg.match(self)) #raise Mismatch.new, "reg: #{reg}\nstr: #{self.to_s}" if block.nil? if block.nil? return false end block.content = cont block.line = line yield block end