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
761 762 763 764 765 766 767 768 769 770 771 |
# File 'lib/deplate/regions.rb', line 761 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
745 746 747 748 749 750 751 752 753 754 |
# File 'lib/deplate/regions.rb', line 745 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
757 758 |
# File 'lib/deplate/regions.rb', line 757 def register_caption end |