Class: PlanMyStuff::ApplicationRecord

Inherits:
Object
  • Object
show all
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

Comment, Issue, Label, Project, ProjectItem

Instance Method Summary collapse

Constructor Details

#initializeApplicationRecord

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

Returns:

  • (Boolean)


22
23
24
# File 'lib/plan_my_stuff/application_record.rb', line 22

def new_record?
  !@persisted
end

#persisted?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/plan_my_stuff/application_record.rb', line 17

def persisted?
  @persisted
end