Class: RablRails::Renderers::PLIST

Inherits:
Base
  • Object
show all
Defined in:
lib/rabl-rails/renderers/plist.rb

Instance Attribute Summary

Attributes inherited from Base

#_options

Instance Method Summary collapse

Methods inherited from Base

#initialize, #render

Constructor Details

This class inherits a constructor from RablRails::Renderers::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RablRails::Renderers::Base

Instance Method Details

#format_output(hash) ⇒ Object



5
6
7
8
# File 'lib/rabl-rails/renderers/plist.rb', line 5

def format_output(hash)
  hash = { _options[:root_name] => hash } if _options[:root_name] && RablRails.include_plist_root
  RablRails.plist_engine.dump(hash)
end