Class: Deplate::Command::CAP

Inherits:
Deplate::Command show all
Defined in:
lib/deplate/commands.rb

Class Method Summary collapse

Methods inherited from Deplate::Command

commands, #finish, #format_special, #process, register_as, #setup, #setup_command, update_variables

Methods included from Names

name_match_c, name_match_fs, name_match_sf

Methods inherited from Element

#join_lines, #join_lines_re_zh_cn

Class Method Details

.accumulate(src, array, deplate, text, match, args, cmd) ⇒ Object



105
106
107
108
109
110
111
112
113
# File 'lib/deplate/commands.rb', line 105

def accumulate(src, array, deplate, text, match, args, cmd)
    Deplate::Core.log("%s: %s" % [cmd, text], :debug, src)
    last = array.last
    if last
        last.set_caption(Deplate::CaptionDef.new(text, args, src), false, args['extended'] || args['bang'])
    else
        Deplate::Core.log(["Cannot attach caption to", nil], :error, src)
    end
end