Class: Aureus::Toolbar

Inherits:
Renderable show all
Defined in:
lib/aureus/toolbar.rb

Instance Method Summary collapse

Methods inherited from Renderable

#compact, #compact_render, #content_tag, #init

Constructor Details

#initialize(title) ⇒ Toolbar

Returns a new instance of Toolbar.



5
6
7
8
9
# File 'lib/aureus/toolbar.rb', line 5

def initialize title
	@title = title
	@left = ToolbarSection.new "left"
	@right = ToolbarSection.new "right"
end

Instance Method Details

#left {|@left| ... } ⇒ Object

Yields:



11
12
13
# File 'lib/aureus/toolbar.rb', line 11

def left
	yield @left
end

#renderObject



19
20
21
22
23
# File 'lib/aureus/toolbar.rb', line 19

def render
	 "div", { :id => "aureus-toolbar" } do
		compact ("h1",@title), @left.render, @right.render
	end
end

#right {|@right| ... } ⇒ Object

Yields:



15
16
17
# File 'lib/aureus/toolbar.rb', line 15

def right
	yield @right
end