Class: Occi::Core::Renderers::Text::ActionInstance
- Includes:
- Instance
- Defined in:
- lib/occi/core/renderers/text/action_instance.rb
Overview
Implements methods needed to render action instances to text-based renderings. This class (its instances) is usually called directly from the “outside”. It utilizes ‘Category` and `Attributes` from this module to render actions and instance attributes.
Constant Summary
Constants inherited from Base
Base::DELEGATED, Base::RENDER_SAFE
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#render_headers ⇒ Hash
Renders ‘object` into text for headers and returns the result as `Hash`.
-
#render_plain ⇒ String
Renders ‘object` into plain text and returns the result as `String`.
Methods inherited from Base
#initialize, #render, #render_safe, render_safe
Constructor Details
This class inherits a constructor from Occi::Core::Renderers::Text::Base
Instance Method Details
#render_headers ⇒ Hash
Renders ‘object` into text for headers and returns the result as `Hash`.
29 30 31 |
# File 'lib/occi/core/renderers/text/action_instance.rb', line 29 def render_headers short_category(object.action).merge(instance_attributes) end |
#render_plain ⇒ String
Renders ‘object` into plain text and returns the result as `String`.
21 22 23 |
# File 'lib/occi/core/renderers/text/action_instance.rb', line 21 def render_plain short_category(object.action) << "\n" << instance_attributes end |