Module: Navbar::Builder

Defined in:
lib/navbar/builder.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/navbar/builder.rb', line 6

def self.extended(base)
  base.class_eval do
    class_attribute :navbar
    self.navbar ||= Configurator.new do |c|
      c.scope = :default
      c.class = nil
      c.tabs = []
    end
  end
end

Instance Method Details



17
18
19
# File 'lib/navbar/builder.rb', line 17

def nav_tab(name, options = {})
  navbar.register(name, options)
end