Class: Erubis::OnlyRuby
- Inherits:
-
Eruby
- Object
- Eruby
- Erubis::OnlyRuby
- Defined in:
- lib/rails_best_practices/core_ext/erubis.rb
Instance Method Summary collapse
- #add_expr_debug(src, code) ⇒ Object
- #add_expr_escaped(src, code) ⇒ Object
- #add_expr_literal(src, code) ⇒ Object
- #add_postamble(src) ⇒ Object
- #add_preamble(src) ⇒ Object
- #add_stmt(src, code) ⇒ Object
- #add_text(src, text) ⇒ Object
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 |