Sha256: af3b18c267f1d5d0208f98384c1acaca3e79cedb6200f0440d5311c074c1eeb6
Contents?: true
Size: 517 Bytes
Versions: 17
Compression:
Stored size: 517 Bytes
Contents
#coding=utf-8 module Aio::Text class LineString < String class Mismatch < StandardError; end attr_accessor :content, :line include Aio::Ui::Verbose # 获得区块 # 并且获得所在的行数 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 end end
Version data entries
17 entries across 17 versions & 1 rubygems