Class: Aureus::ToolbarSection
Instance Method Summary
collapse
Methods inherited from Renderable
#compact, #compact_render, #content_tag, #init
Constructor Details
Returns a new instance of ToolbarSection.
29
30
31
32
|
# File 'lib/aureus/toolbar.rb', line 29
def initialize position
@items = Array.new
@position = position
end
|
Instance Method Details
#info(text) ⇒ Object
38
39
40
|
# File 'lib/aureus/toolbar.rb', line 38
def info text
@items << ToolbarInfo.new(text)
end
|
#link_to(text, url, *args) ⇒ Object
34
35
36
|
# File 'lib/aureus/toolbar.rb', line 34
def link_to text, url, *args
@items << ToolbarButton.new(text,url,args)
end
|
#render ⇒ Object
42
43
44
|
# File 'lib/aureus/toolbar.rb', line 42
def render
content_tag "ul", compact_render(*@items), :class => @position
end
|