Class: Pulitzer::PostTypesController::CreateTemplateVersion
- Inherits:
-
Object
- Object
- Pulitzer::PostTypesController::CreateTemplateVersion
- Defined in:
- app/interactions/pulitzer/post_types_controller/create_template_version.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(post_type) ⇒ CreateTemplateVersion
constructor
A new instance of CreateTemplateVersion.
Constructor Details
#initialize(post_type) ⇒ CreateTemplateVersion
Returns a new instance of CreateTemplateVersion.
3 4 5 |
# File 'app/interactions/pulitzer/post_types_controller/create_template_version.rb', line 3 def initialize(post_type) @post_type = post_type end |
Instance Method Details
#call ⇒ Object
7 8 9 10 |
# File 'app/interactions/pulitzer/post_types_controller/create_template_version.rb', line 7 def call post_type_version = @post_type.post_type_versions.create Pulitzer::PostTypesController::CreateSingletonPost.new(post_type_version).call end |