lib/simple_navigation.rb in simple-navigation-3.6.0 vs lib/simple_navigation.rb in simple-navigation-3.7.0
- old
+ new
@@ -44,10 +44,11 @@
# Returns the current framework in which the plugin is running.
def framework
return :rails if defined?(Rails)
return :padrino if defined?(Padrino)
return :sinatra if defined?(Sinatra)
+ return :nanoc if defined?(Nanoc3)
raise 'simple_navigation currently only works for Rails, Sinatra and Padrino apps'
end
# Loads the adapter for the current framework
def load_adapter
@@ -56,9 +57,11 @@
SimpleNavigation::Adapters::Rails
when :sinatra
SimpleNavigation::Adapters::Sinatra
when :padrino
SimpleNavigation::Adapters::Padrino
+ when :nanoc
+ SimpleNavigation::Adapters::Nanoc
end
end
# Creates a new adapter instance based on the context in which render_navigation has been called.
def init_adapter_from(context)