Module: SlimLint::Filter::Overrides
- Included in:
- SlimLint::Filter
- Defined in:
- lib/slim_lint/filter.rb
Instance Method Summary collapse
- #on_escape(flag, content) ⇒ Object
- #on_html_attr(name, content) ⇒ Object
- #on_html_attrs(*attrs) ⇒ Object
- #on_html_comment(content) ⇒ Object
- #on_html_condcomment(condition, content) ⇒ Object
- #on_html_js(content) ⇒ Object
- #on_html_tag(name, attrs, content = nil) ⇒ Object
- #on_multi(*exps) ⇒ Object
-
#on_slim_control(code, content) ⇒ Object
Pass-through handler.
-
#on_slim_embedded(type, content, attrs) ⇒ Object
Pass-through handler.
-
#on_slim_output(escape, code, content) ⇒ Object
Pass-through handler.
-
#on_slim_text(type, content) ⇒ Object
Pass-through handler.
Instance Method Details
#on_escape(flag, content) ⇒ Object
11 12 13 14 |
# File 'lib/slim_lint/filter.rb', line 11 def on_escape(flag, content) @self[2] = compile(content) @self end |
#on_html_attr(name, content) ⇒ Object
21 22 23 24 |
# File 'lib/slim_lint/filter.rb', line 21 def on_html_attr(name, content) @self[3] = compile(content) @self end |
#on_html_attrs(*attrs) ⇒ Object
16 17 18 19 |
# File 'lib/slim_lint/filter.rb', line 16 def on_html_attrs(*attrs) attrs.each.with_index(2) { |attr, i| @self[i] = compile(attr) } @self end |
#on_html_comment(content) ⇒ Object
26 27 28 29 |
# File 'lib/slim_lint/filter.rb', line 26 def on_html_comment(content) @self[2] = compile(content) @self end |
#on_html_condcomment(condition, content) ⇒ Object
31 32 33 34 |
# File 'lib/slim_lint/filter.rb', line 31 def on_html_condcomment(condition, content) @self[3] = compile(content) @self end |
#on_html_js(content) ⇒ Object
36 37 38 39 |
# File 'lib/slim_lint/filter.rb', line 36 def on_html_js(content) @self[2] = compile(content) @self end |
#on_html_tag(name, attrs, content = nil) ⇒ Object
41 42 43 44 45 |
# File 'lib/slim_lint/filter.rb', line 41 def on_html_tag(name, attrs, content = nil) @self[3] = compile(attrs) @self[4] = compile(content) if content @self end |
#on_multi(*exps) ⇒ Object
6 7 8 9 |
# File 'lib/slim_lint/filter.rb', line 6 def on_multi(*exps) exps.each.with_index(1) { |exp, i| @self[i] = compile(exp) } @self end |
#on_slim_control(code, content) ⇒ Object
Pass-through handler
60 61 62 63 |
# File 'lib/slim_lint/filter.rb', line 60 def on_slim_control(code, content) @self[3] = compile(content) @self end |
#on_slim_embedded(type, content, attrs) ⇒ Object
Pass-through handler
54 55 56 57 |
# File 'lib/slim_lint/filter.rb', line 54 def (type, content, attrs) @self[3] = compile(content) @self end |
#on_slim_output(escape, code, content) ⇒ Object
Pass-through handler
66 67 68 69 |
# File 'lib/slim_lint/filter.rb', line 66 def on_slim_output(escape, code, content) @self[4] = compile(content) @self end |
#on_slim_text(type, content) ⇒ Object
Pass-through handler
48 49 50 51 |
# File 'lib/slim_lint/filter.rb', line 48 def on_slim_text(type, content) @self[3] = compile(content) @self end |