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
Components::Box, Components::DataTable, Components::DataTableHead, Components::DataTableHeadColumn, Components::DataTableRow, Components::DataTableRowButton, Components::DataTableRowCell, Components::Listing, Components::ListingEntry, Components::Messages, Components::Navigation, Components::NavigationButton, Components::Row, Components::RowColumn, Components::SimpleMap, Components::Toolbar, Components::ToolbarButton, Components::ToolbarDivider, Components::ToolbarDropdown, Components::ToolbarInfo, Components::ToolbarSection
Instance Method Summary
collapse
Constructor Details
#initialize(content) ⇒ Renderable
Returns a new instance of Renderable.
9
10
11
|
# File 'lib/aureus/renderable.rb', line 9
def initialize(content)
@content = content
end
|
Instance Method Details
#compact(*args) ⇒ Object
21
22
23
|
# File 'lib/aureus/renderable.rb', line 21
def compact(*args)
args.join.html_safe
end
|
#compact_render(*args) ⇒ Object
25
26
27
|
# File 'lib/aureus/renderable.rb', line 25
def compact_render(*args)
args.map{ |e| e.render }.join.html_safe
end
|
#content_tag(name, content_or_options_with_block = nil, options = nil, escape = false, &block) ⇒ Object
17
18
19
|
# File 'lib/aureus/renderable.rb', line 17
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
13
14
15
|
# File 'lib/aureus/renderable.rb', line 13
def init(args, *defaults)
@options = defaults..merge(args.)
end
|
#render ⇒ Object
29
30
31
|
# File 'lib/aureus/renderable.rb', line 29
def render
@content
end
|