Class: Deplate::Regions::Abstract

Inherits:
Deplate::Region::SecondOrder show all
Defined in:
lib/deplate/regions.rb

Instance Method Summary collapse

Methods inherited from Deplate::Region::SecondOrder

#process, #push_styles

Methods inherited from Deplate::Region

check_file, clean_strings, #deprecated_regnote, deprecated_regnote, #finish_accum, #format_compound, regions, register_as, set_line_cont, #setup

Methods inherited from Element

#join_lines, #join_lines_re_zh_cn

Instance Method Details

#finishObject



826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
# File 'lib/deplate/regions.rb', line 826

def finish
    rv   = super
    lang = @args['lang'] || @deplate.options.lang
    hd   = @deplate.headings[@level_heading]
    if hd
        hd.abstract = self
        if hd != @top_heading
            @top_heading.abstract ||= self
        end
    else
        @deplate.(@source, 
                                   'type'  => 'abstract', 
                                   'lang'  => lang,
                                   'value' => @accum
                                  )
    end
    rv
end