Module: EffectiveMemberships

Includes:
EffectiveGem
Defined in:
lib/effective_memberships.rb,
lib/effective_memberships/engine.rb,
lib/effective_memberships/version.rb,
lib/generators/effective_memberships/install_generator.rb

Defined Under Namespace

Modules: Generators Classes: Engine

Constant Summary collapse

VERSION =
'0.7.0'

Class Method Summary collapse

Class Method Details

.ApplicantObject



27
28
29
# File 'lib/effective_memberships.rb', line 27

def self.Applicant
  applicant_class_name&.constantize || Effective::Applicant
end

.applicant_reviews?Boolean

Returns:

  • (Boolean)


68
69
70
# File 'lib/effective_memberships.rb', line 68

def self.applicant_reviews?
  applicant_reviews == true
end

.ApplicantReviewObject



31
32
33
# File 'lib/effective_memberships.rb', line 31

def self.ApplicantReview
  applicant_review_class_name&.constantize || Effective::ApplicantReview
end

.CategoryObject



19
20
21
# File 'lib/effective_memberships.rb', line 19

def self.Category
  category_class_name&.constantize || Effective::Category
end

.config_keysObject



7
8
9
10
11
12
13
14
15
# File 'lib/effective_memberships.rb', line 7

def self.config_keys
  [
    :categories_table_name, :applicants_table_name, :applicant_reviews_table_name, :fee_payments_table_name, :organizations_table_name, :representatives_table_name, :statuses_table_name,
    :category_class_name, :organization_class_name, :applicant_class_name, :applicant_review_class_name, :fee_payment_class_name, :registrar_class_name, :membership_card_class_name, :status_class_name,
    :additional_fee_types, :applicant_reviews, :applicant_endorsements_endorser_collection,
    :layout,
    :mailer, :parent_mailer, :deliver_method, :mailer_layout, :mailer_sender, :mailer_admin, :mailer_subject, :use_effective_email_templates
  ]
end

.custom_fee_typesObject

You can delete these if unpurchased



64
65
66
# File 'lib/effective_memberships.rb', line 64

def self.custom_fee_types
  ['Admin']
end

.fee_typesObject



56
57
58
59
60
61
# File 'lib/effective_memberships.rb', line 56

def self.fee_types
  required = ['Applicant', 'Reinstatement', 'Prorated', 'Discount', 'Renewal', 'Late', 'Admin']
  additional = Array(additional_fee_types)

  (required + additional).uniq.sort
end

.FeePaymentObject



35
36
37
# File 'lib/effective_memberships.rb', line 35

def self.FeePayment
  fee_payment_class_name&.constantize || Effective::FeePayment
end

.mailer_classObject



52
53
54
# File 'lib/effective_memberships.rb', line 52

def self.mailer_class
  mailer&.constantize || Effective::MembershipsMailer
end

.MembershipCardObject



39
40
41
# File 'lib/effective_memberships.rb', line 39

def self.MembershipCard
  membership_card_class_name&.constantize || Effective::MembershipCard
end

.OrganizationObject



23
24
25
# File 'lib/effective_memberships.rb', line 23

def self.Organization
  organization_class_name&.constantize || Effective::Organization
end

.RegistrarObject

Singleton



48
49
50
# File 'lib/effective_memberships.rb', line 48

def self.Registrar
  (registrar_class_name&.constantize || Effective::Registrar).new
end

.StatusObject



43
44
45
# File 'lib/effective_memberships.rb', line 43

def self.Status
  status_class_name&.constantize || Effective::Status
end