Class: Aureus::Renderable
- Inherits:
-
Object
- Object
- Aureus::Renderable
show all
- Includes:
- ActionView::Context, ActionView::Helpers::CaptureHelper, ActionView::Helpers::TagHelper, ActionView::Helpers::UrlHelper, Haml::Helpers
- Defined in:
- lib/aureus/renderable.rb
Direct Known Subclasses
Box, BoxButton, Content, DataTable, DataTableHead, DataTableHeadColumn, DataTableRow, DataTableRowButton, DataTableRowCell, Listing, ListingEntry, Map, Messages, Navigation, NavigationButton, Row, RowColumn, Toolbar, ToolbarButton, ToolbarInfo, ToolbarSection
Instance Method Summary
collapse
Constructor Details
#initialize(content) ⇒ Renderable
Returns a new instance of Renderable.
10
11
12
|
# File 'lib/aureus/renderable.rb', line 10
def initialize content
@content = content
end
|
Instance Method Details
#compact(*args) ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/aureus/renderable.rb', line 22
def compact *args
out = String.new.html_safe
args.each do |i|
out += i
end
out
end
|
#compact_render(*args) ⇒ Object
30
31
32
33
34
35
36
|
# File 'lib/aureus/renderable.rb', line 30
def compact_render *args
out = String.new.html_safe
args.each do |i|
out += i.render
end
out
end
|
#content_tag(name, content_or_options_with_block = nil, options = nil, escape = false, &block) ⇒ Object
18
19
20
|
# File 'lib/aureus/renderable.rb', line 18
def content_tag name, content_or_options_with_block = nil, options = nil, escape = false, &block
super name, content_or_options_with_block, options, escape, &block
end
|
#init(args, *defaults) ⇒ Object
14
15
16
|
# File 'lib/aureus/renderable.rb', line 14
def init args, *defaults
@options = defaults..merge args.
end
|
#render ⇒ Object
38
39
40
|
# File 'lib/aureus/renderable.rb', line 38
def render
@content
end
|