Sha256: e49c761ad57a02ff1465f47fd093de195a22addaa15528de9c1959a3b64e0d82

Contents?: true

Size: 354 Bytes

Versions: 21

Compression:

Stored size: 354 Bytes

Contents

if defined?(ActiveSupport::SafeBuffer)
  SafeBuffer = ActiveSupport::SafeBuffer
else
  require 'padrino/safe_buffer'

  SafeBuffer = Padrino::SafeBuffer

  class String
    def html_safe
      SafeBuffer.new(self)
    end
  end

  class Object
    def html_safe?
      false
    end
  end

  class Numeric
    def html_safe?
      true
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
padrino-helpers-0.16.0.pre3 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.16.0.pre2 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.15.3 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.15.2 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.15.1 lib/padrino/core_ext/output_safety.rb
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/padrino-helpers-0.13.3.4/lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.15.0 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.14.4 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.14.3 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.14.2 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.13.3.4 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.14.1.1 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.14.1 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.14.0.2 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.14.0.1 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.14.0 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.14.0.rc2 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.14.0.rc1 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.13.3.3 lib/padrino/core_ext/output_safety.rb
padrino-helpers-0.13.3.2 lib/padrino/core_ext/output_safety.rb