Class: Erubis::OnlyRuby

Inherits:
Eruby
  • Object
show all
Defined in:
lib/rails_best_practices/core_ext/erubis.rb

Instance Method Summary collapse

Instance Method Details

#add_expr_debug(src, code) ⇒ Object



28
29
30
31
# File 'lib/rails_best_practices/core_ext/erubis.rb', line 28

def add_expr_debug(src, code)
  src << code
  src << ";"
end

#add_expr_escaped(src, code) ⇒ Object



23
24
25
26
# File 'lib/rails_best_practices/core_ext/erubis.rb', line 23

def add_expr_escaped(src, code)
  src << code
  src << ";"
end

#add_expr_literal(src, code) ⇒ Object



18
19
20
21
# File 'lib/rails_best_practices/core_ext/erubis.rb', line 18

def add_expr_literal(src, code)
  src << code
  src << ";"
end

#add_postamble(src) ⇒ Object



33
34
# File 'lib/rails_best_practices/core_ext/erubis.rb', line 33

def add_postamble(src)
end

#add_preamble(src) ⇒ Object



6
7
# File 'lib/rails_best_practices/core_ext/erubis.rb', line 6

def add_preamble(src)
end

#add_stmt(src, code) ⇒ Object



13
14
15
16
# File 'lib/rails_best_practices/core_ext/erubis.rb', line 13

def add_stmt(src, code)
  src << code
  src << ";"
end

#add_text(src, text) ⇒ Object



9
10
11
# File 'lib/rails_best_practices/core_ext/erubis.rb', line 9

def add_text(src, text)
  src << text.gsub(/[^\s;]/, '')
end