Class: Occi::Core::Renderers::Json::ActionInstance

Inherits:
Base
  • Object
show all
Defined in:
lib/occi/core/renderers/json/action_instance.rb

Overview

Implements routines required to render `Occi::Core::ActionInstance` and its subclasses to a JSON-based representation.

Author:

Constant Summary

Constants inherited from Base

Base::DELEGATED

Instance Attribute Summary

Attributes inherited from Base

#object, #options

Instance Method Summary collapse

Methods inherited from Base

#initialize, #render

Constructor Details

This class inherits a constructor from Occi::Core::Renderers::Json::Base

Instance Method Details

#render_hashObject

:nodoc:


14
15
16
17
18
19
# File 'lib/occi/core/renderers/json/action_instance.rb', line 14

def render_hash
  hsh = {}
  hsh[:action] = object_action.to_s
  hsh[:attributes] = Attributes.new(object_attributes, options).render_hash unless object_attributes.blank?
  hsh
end