Class: Pulitzer::PostTypeVersion::Retire
- Inherits:
-
Object
- Object
- Pulitzer::PostTypeVersion::Retire
- Includes:
- StateMachine::Transition
- Defined in:
- app/services/pulitzer/post_type_version/retire.rb
Instance Method Summary collapse
-
#initialize(post_type_version) ⇒ Retire
constructor
A new instance of Retire.
- #retire ⇒ Object
Constructor Details
#initialize(post_type_version) ⇒ Retire
Returns a new instance of Retire.
8 9 10 11 12 |
# File 'app/services/pulitzer/post_type_version/retire.rb', line 8 def initialize(post_type_version) @post_type_version = post_type_version self.object = @post_type_version self.errors = ActiveModel::Errors.new(self) end |
Instance Method Details
#retire ⇒ Object
14 15 16 17 18 |
# File 'app/services/pulitzer/post_type_version/retire.rb', line 14 def retire self.validate_transition! update_status return true end |