Sha256: e84a2867a23d394c18719c50d8b281b5bdee38d5031414aeeb74404183d62aeb

Contents?: true

Size: 315 Bytes

Versions: 11

Compression:

Stored size: 315 Bytes

Contents

module SketchilyHelper
  def sketchily_show(uri, options = {})
    "<img src='data:image/svg+xml;base64,#{uri}' #{"width='#{options[:width]}'" if options[:width]} #{"height='#{options[:height]}'" if options[:height]}/>".html_safe
  end

  def svg_show(uri, options = {})
    sketchily_show(uri, options)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sketchily-1.3.0 app/helpers/sketchily_helper.rb
sketchily-1.2.0 app/helpers/sketchily_helper.rb
sketchily-1.1.0 app/helpers/sketchily_helper.rb
sketchily-1.0.3 app/helpers/sketchily_helper.rb
sketchily-1.0.2 app/helpers/sketchily_helper.rb
sketchily-1.0.1 app/helpers/sketchily_helper.rb
sketchily-1.0.0 app/helpers/sketchily_helper.rb
sketchily-0.3.0 app/helpers/sketchily_helper.rb
sketchily-0.2.0 app/helpers/sketchily_helper.rb
sketchily-0.1.0 app/helpers/sketchily_helper.rb
sketchily-0.0.2 app/helpers/sketchily_helper.rb