Module: W2Tags::Block::BlockHot

Defined in:
lib/w2tags/block/block_hot.rb

Instance Method Summary collapse

Instance Method Details

#bhot_skipObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/w2tags/block/block_hot.rb', line 11

def bhot_skip
  @rgx = nil
  if(/(^[\t ]*)(!H!) *(\w+) *\n/ =~ @row;@rgx = $~)
    # if current line was inside in this block 
    # flush as an adding hot and reinit for new hot
    if @bht != 99
       make_hot
    end
    @end_hot= nil
    @key_hot= $3.strip
    @doc_hot= [] #bhot buffer
    @bht = @spc.size
  elsif @bht!= 99 
    if @spc.size<= @bht && @ron!=0
       make_hot
       @bht = 99
    elsif @row.strip!=''
       if /(\<\<\/)(.+)/ =~ @row
         @end_hot= $2
       else
         @doc_hot<< @row
       end
    end
  end
  @row = '' if @bht!=99
  @bht!=99
end

#bhot_skip_initializeObject



4
5
6
7
8
9
# File 'lib/w2tags/block/block_hot.rb', line 4

def bhot_skip_initialize
  @end_hot= nil
  @key_hot= '' #key for hot
  @doc_hot= [] #bhot buffer
  @bht    = 99 #hot indentation block
end