Class: Harbor::XMLViewContext
- Inherits:
-
ViewContext
- Object
- ViewContext
- Harbor::XMLViewContext
- Defined in:
- lib/harbor/xml_view.rb
Instance Attribute Summary
Attributes inherited from ViewContext
Instance Method Summary collapse
Methods inherited from ViewContext
#[], #[]=, #capture, #clear, #each, #initialize, #locale, #merge, #plugin, #replace, #to_hash
Methods included from ViewContext::Helpers::Cache
Methods included from ViewContext::Helpers::Url
Methods included from ViewContext::Helpers::Html
#split_into_columns, #split_into_groups
Methods included from ViewContext::Helpers::Text
#h, #q, #truncate, #truncate_on_words
Methods included from ViewContext::Helpers::Form
Constructor Details
This class inherits a constructor from Harbor::ViewContext
Instance Method Details
#render(partial, variables = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/harbor/xml_view.rb', line 7 def render(partial, variables=nil) context = to_hash result = XMLView.new(partial, merge(variables)).to_s replace(context) result end |
#xml ⇒ Object
17 18 19 |
# File 'lib/harbor/xml_view.rb', line 17 def xml @view.xml end |