Class: Deplate::Command::TABLE

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

Instance Method Summary collapse

Methods inherited from Deplate::Command

commands, #format_special, #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

#finishObject



626
627
628
629
630
# File 'lib/deplate/commands.rb', line 626

def finish
    rv = Deplate::Regions::Table.make_char_separated(self, @accum, @args['sep'])
    rv.unify_props(self)
    rv
end

#setup_commandObject



618
619
620
621
622
623
624
# File 'lib/deplate/commands.rb', line 618

def setup_command
    if File.exist?(@text)
        File.open(@text) {|io| @accum = io.read.split(/[\r\n]+/)}
    else
        log(['File not found', @text], :error)
    end
end