Sha256: d2608d83b5a900858f2009dea947bb128cf880cb244735f61bbdcd66e5d8c6da

Contents?: true

Size: 356 Bytes

Versions: 2

Compression:

Stored size: 356 Bytes

Contents

require 'simple-navigation'

module Sinatra
  
  module SimpleNavigation
    def self.registered(app)
      app.helpers ::SimpleNavigation::Helpers
    end
  end

  #check if root is defined. It's undefined for modular style apps. 
  unless ::Sinatra::Application.root.nil?
    ::SimpleNavigation.register
    helpers ::SimpleNavigation::Helpers
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sinatra-simple-navigation-3.3.0 lib/sinatra/simple_navigation.rb
sinatra-simple-navigation-3.2.1 lib/sinatra/simple_navigation.rb