Class: Pulitzer::PostTypeVersionsController::Export
- Inherits:
-
Object
- Object
- Pulitzer::PostTypeVersionsController::Export
- Defined in:
- app/interactions/pulitzer/post_type_versions_controller/export.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(post_type_version) ⇒ Export
constructor
A new instance of Export.
Constructor Details
#initialize(post_type_version) ⇒ Export
Returns a new instance of Export.
3 4 5 |
# File 'app/interactions/pulitzer/post_type_versions_controller/export.rb', line 3 def initialize(post_type_version) @post_type_version = post_type_version end |
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 |
# File 'app/interactions/pulitzer/post_type_versions_controller/export.rb', line 7 def call json_hash = @post_type_version.as_json( Pulitzer::PostTypeVersion.export_config ) Pulitzer::PostTypeVersion.convert_hash_to_nested(json_hash).to_json end |