Sha256: 09f66c2f81c9b522b3d7713556b05b674e32d37196085276dc4b878e41460c06

Contents?: true

Size: 477 Bytes

Versions: 3

Compression:

Stored size: 477 Bytes

Contents

module SimpleNavigation
  module Adapters
    class Padrino < Sinatra
      def self.register
        SimpleNavigation.set_env(PADRINO_ROOT, PADRINO_ENV)
        ::Padrino::Application.send(:helpers, SimpleNavigation::Helpers)
      end

      def link_to(name, url, options = {})
        context.link_to(name, url, options)
      end

      def content_tag(type, content, options = {})
        context.content_tag(type, content.html_safe, options)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
simple-navigation-3.13.0 lib/simple_navigation/adapters/padrino.rb
simple-navigation-3.12.2 lib/simple_navigation/adapters/padrino.rb
simple-navigation-3.12.1 lib/simple_navigation/adapters/padrino.rb