Class: Deplate::Command::XARG

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

Instance Method Summary collapse

Methods inherited from Deplate::Command

commands, #finish, #process, register_as, #setup, 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

Instance Method Details

#format_specialObject



349
350
351
# File 'lib/deplate/commands.rb', line 349

def format_special
    @elt
end

#setup_commandObject

self.volatile = true



339
340
341
342
343
344
345
346
347
# File 'lib/deplate/commands.rb', line 339

def setup_command
    id = args['id'] || @accum[0]
    @elt = @deplate.variables[id] || @args['default']
    if @elt
        @elt = Deplate::Command::ARG.preformat_element(@elt, @args)
    else
        log(['Unknown variable', id, @name], :error)
    end
end