Class: MessageTrain::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/message_train/configuration.rb

Overview

MessageTrain configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

rubocop:disable Metrics/MethodLength Don’t see any way to shorten this



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/message_train/configuration.rb', line 53

def initialize
  self.recipient_tables = {}
  self.slug_columns = { users: :slug }
  self.name_columns = { users: :name }
  self.user_model = 'User'
  self.current_user_method = :current_user
  self. = '/users/sign_in'
  self.user_route_authentication_method = :user
  self.address_book_method = :address_book # This is a fallback
  self.address_book_methods = {}
  self.collectives_for_recipient_methods = {}
  self.valid_senders_methods = {}
  self.valid_recipients_methods = {}
  self.from_email = ''
  self.site_name = 'Example Site Name'
end

Instance Attribute Details

#address_book_methodObject

Returns the value of attribute address_book_method.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def address_book_method
  @address_book_method
end

#address_book_methodsObject

Returns the value of attribute address_book_methods.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def address_book_methods
  @address_book_methods
end

#collectives_for_recipient_methodsObject

Returns the value of attribute collectives_for_recipient_methods.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def collectives_for_recipient_methods
  @collectives_for_recipient_methods
end

#current_user_methodObject

Returns the value of attribute current_user_method.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def current_user_method
  @current_user_method
end

#from_emailObject

Returns the value of attribute from_email.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def from_email
  @from_email
end

#name_columnsObject

Returns the value of attribute name_columns.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def name_columns
  @name_columns
end

#recipient_tablesObject

Returns the value of attribute recipient_tables.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def recipient_tables
  @recipient_tables
end

#site_nameObject

Returns the value of attribute site_name.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def site_name
  @site_name
end

#slug_columnsObject

Returns the value of attribute slug_columns.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def slug_columns
  @slug_columns
end

#user_modelObject

Returns the value of attribute user_model.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def user_model
  @user_model
end

#user_route_authentication_methodObject

Returns the value of attribute user_route_authentication_method.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def user_route_authentication_method
  @user_route_authentication_method
end

#user_sign_in_pathObject

Returns the value of attribute user_sign_in_path.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def 
  @user_sign_in_path
end

#valid_recipients_methodsObject

Returns the value of attribute valid_recipients_methods.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def valid_recipients_methods
  @valid_recipients_methods
end

#valid_senders_methodsObject

Returns the value of attribute valid_senders_methods.



36
37
38
# File 'lib/message_train/configuration.rb', line 36

def valid_senders_methods
  @valid_senders_methods
end