Class: Deplate::Regions::Table
- Inherits:
-
Deplate::Region
- Object
- Element
- Deplate::Region
- Deplate::Regions::Table
- Defined in:
- lib/deplate/regions.rb
Class Method Summary collapse
Instance Method Summary collapse
- #finish ⇒ Object
-
#register_caption ⇒ Object
duck method.
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
Class Method Details
.make_char_separated(instance, accum, sep = nil) ⇒ Object
777 778 779 780 781 782 783 784 785 786 787 |
# File 'lib/deplate/regions.rb', line 777 def make_char_separated(instance, accum, sep=nil) sep = Regexp.new(sep || "\t") acc = accum.collect {|l| %{| #{l.gsub(sep, " | ")} |}} beg = 1 + instance.source.begin file = instance.source.file table = instance.deplate.parsed_array_from_strings(acc, beg, file) n = table[0] n.collapse = false n.unify_props(instance) return n end |
Instance Method Details
#finish ⇒ Object
761 762 763 764 765 766 767 768 769 770 |
# File 'lib/deplate/regions.rb', line 761 def finish finish_accum case @regNote.strip when "limited" log("Not yet implemented!", :error) return nil else return Deplate::Regions::Table.make_char_separated(self, @accum, @args["sep"]) end end |
#register_caption ⇒ Object
duck method
773 774 |
# File 'lib/deplate/regions.rb', line 773 def end |