Class: Pulitzer::PostTypesController::CreateTemplateVersion

Inherits:
Object
  • Object
show all
Defined in:
app/interactions/pulitzer/post_types_controller/create_template_version.rb

Instance Method Summary collapse

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

#callObject



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