Class: PlanMyStuff::ApplicationRecord
- Inherits:
-
Object
- Object
- PlanMyStuff::ApplicationRecord
- Includes:
- ActiveModel::Model
- Defined in:
- lib/plan_my_stuff/application_record.rb
Overview
Base class for all PMS domain objects backed by GitHub resources. Provides shared persistence predicates and utility helpers.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize ⇒ ApplicationRecord
constructor
A new instance of ApplicationRecord.
- #new_record? ⇒ Boolean
- #persisted? ⇒ Boolean
Constructor Details
#initialize ⇒ ApplicationRecord
Returns a new instance of ApplicationRecord.
11 12 13 14 |
# File 'lib/plan_my_stuff/application_record.rb', line 11 def initialize(**) super @persisted = false end |
Instance Method Details
#new_record? ⇒ Boolean
22 23 24 |
# File 'lib/plan_my_stuff/application_record.rb', line 22 def new_record? !@persisted end |
#persisted? ⇒ Boolean
17 18 19 |
# File 'lib/plan_my_stuff/application_record.rb', line 17 def persisted? @persisted end |