Sha256: c8cb4dcd7bf618ff1a0a62395b9bdc5bbf7eaf079caaa49f53062ba2d5d3aba3
Contents?: true
Size: 396 Bytes
Versions: 13
Compression:
Stored size: 396 Bytes
Contents
class Pulitzer::UpdateSingletonPost attr_accessor :post_type, :title def initialize(post_type, title) self.post_type = post_type self.title = title end def call if post_type.singular? unless post_type.singleton_post? Pulitzer::CreateSingletonPost.new(post_type).call else post_type.singleton_post.update(title: title) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems