Class: Deplate::Regions::Ruby
- Inherits:
-
Deplate::Region
- Object
- Element
- Deplate::Region
- Deplate::Regions::Ruby
- Defined in:
- lib/deplate/regions.rb
Instance Method Summary collapse
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
#finish ⇒ Object
1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 |
# File 'lib/deplate/regions.rb', line 1130 def finish finish_accum @accum = [@deplate.eval_ruby(self, @args, @accum.join("\n")).to_s] if @args['verb'] return Deplate::Regions::Verbatim.new(@deplate, @source, @accum, @match, self).finish elsif @args['img'] or @args['image'] file = @args['img'] || @args['image'] return Deplate::Command::IMG.new(@deplate, @source, file, nil, {}, 'IMG').finish elsif @args['native'] return Deplate::Regions::Native.new(@deplate, @source, @accum, @match, self).finish else acc = [] @accum.collect! {|l| l.split(/\n/)} @accum.flatten! @deplate.include_stringarray(@accum, acc, @source.begin, @source.file) return acc end end |