Class: Haml::Filters::Opal

Inherits:
Base
  • Object
show all
Defined in:
lib/opal/rails/haml6_filter.rb

Instance Method Summary collapse

Instance Method Details

#compile(node) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/opal/rails/haml6_filter.rb', line 11

def compile(node)
  template = [:multi]
  template << [:static, "<script type='#{mime_type}'>\n"]
  template << [:static, ::Opal.compile(node.value[:text]) ]
  template << [:static, "\n</script>"]
  template
end

#mime_typeObject



8
9
# File 'lib/opal/rails/haml6_filter.rb', line 8

def mime_type
end