Sha256: 5cf17330fb766b45b923cbfc76069ced8bbbae076b47aec477ad898f45a9da2b

Contents?: true

Size: 271 Bytes

Versions: 7

Compression:

Stored size: 271 Bytes

Contents

require 'uv'
module BrighterPlanetHelper
  def render_or_nothing(*args)
    begin
      render(*args)
    rescue ::ActionView::MissingTemplate
      nil
    end
  end
  def syntax(code, lang = 'ruby')
    ::Uv.parse(code, 'xhtml', lang, false, :idle).html_safe
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
brighter_planet_layout-0.2.20 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.19 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.18 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.17 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.16 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.15 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.14 app/helpers/brighter_planet_helper.rb