Sha256: 46293b6ff035c7b184462443897c4071be88238712655be43e76cb4c55bb1003

Contents?: true

Size: 278 Bytes

Versions: 45

Compression:

Stored size: 278 Bytes

Contents

class String
  def html_safe
    # Convert to a real string (opal uses native strings normally, so wrap so we can
    # use instance variables)
    str = String.new(self)
    str.instance_variable_set('@html_safe', true)
    str
  end

  def html_safe?
    @html_safe
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
volt-0.9.7.pre8 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.7.pre7 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.7.pre6 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.7.pre5 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.7.pre3 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.7.pre2 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.6 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.6.pre3 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.6.pre2 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.6.pre1 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.5 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.5.pre12 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.5.pre11 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.5.pre9 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.5.pre8 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.5.pre7 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.5.pre6 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.5.pre5 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.5.pre4 lib/volt/page/bindings/html_safe/string_extension.rb
volt-0.9.5.pre3 lib/volt/page/bindings/html_safe/string_extension.rb