convert
convert input string into target language
# File lib/erubis/converter.rb, line 33 33: def convert(input) 34: codebuf = "" # or [] 35: @preamble.nil? ? add_preamble(codebuf) : (@preamble && (codebuf << @preamble)) 36: convert_input(codebuf, input) 37: @postamble.nil? ? add_postamble(codebuf) : (@postamble && (codebuf << @postamble)) 38: @_proc = nil # clear cached proc object 39: return codebuf # or codebuf.join() 40: end
(abstract) convert input to code
# File lib/erubis/converter.rb, line 77 77: def convert_input(codebuf, input) 78: not_implemented 79: end
detect spaces at beginning of line
# File lib/erubis/converter.rb, line 47 47: def detect_spaces_at_bol(text, is_bol) 48: lspace = nil 49: if text.empty? 50: lspace = "" if is_bol 51: elsif text[1] == \n\ 52: lspace = "" 53: else 54: rindex = text.rindex(\n\) 55: if rindex 56: s = text[rindex+1..1] 57: if s =~ /\A[ \t]*\z/ 58: lspace = s 59: #text = text[0..rindex] 60: text[rindex+1..1] = '' 61: end 62: else 63: if is_bol && text =~ /\A[ \t]*\z/ 64: #lspace = text 65: #text = nil 66: lspace = text.dup 67: text[0..1] = '' 68: end 69: end 70: end 71: return lspace 72: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.