Sha256: 9dc98b671c416fa8918d54953ec2008d367dfaf666f4abe56bcffa3977c1b7d0

Contents?: true

Size: 390 Bytes

Versions: 11

Compression:

Stored size: 390 Bytes

Contents

require 'simple-navigation'

module Sinatra
  
  module SimpleNavigation
    def self.registered(app)
      app.helpers ::SimpleNavigation::Helpers
      ::SimpleNavigation.register
    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

11 entries across 11 versions & 1 rubygems

Version Path
sinatra-simple-navigation-3.6.0 lib/sinatra/simple_navigation.rb
sinatra-simple-navigation-3.5.1 lib/sinatra/simple_navigation.rb
sinatra-simple-navigation-3.5.0 lib/sinatra/simple_navigation.rb
sinatra-simple-navigation-3.4.2 lib/sinatra/simple_navigation.rb
sinatra-simple-navigation-3.4.1 lib/sinatra/simple_navigation.rb
sinatra-simple-navigation-3.4.0 lib/sinatra/simple_navigation.rb
sinatra-simple-navigation-3.3.5 lib/sinatra/simple_navigation.rb
sinatra-simple-navigation-3.3.4 lib/sinatra/simple_navigation.rb
sinatra-simple-navigation-3.3.3 lib/sinatra/simple_navigation.rb
sinatra-simple-navigation-3.3.2 lib/sinatra/simple_navigation.rb
sinatra-simple-navigation-3.3.1 lib/sinatra/simple_navigation.rb