lib/message_train/configuration.rb in message_train-0.5.2 vs lib/message_train/configuration.rb in message_train-0.5.3
- old
+ new
@@ -1,17 +1,17 @@
+# MessageTrain module
module MessageTrain
def self.configure(configuration = MessageTrain::Configuration.new)
- if block_given?
- yield configuration
- end
+ block_given? && yield(configuration)
@@configuration = configuration
end
def self.configuration
@@configuration ||= MessageTrain::Configuration.new
end
+ # MessageTrain configuration
class Configuration
attr_accessor :slug_columns,
:name_columns,
:current_user_method,
:user_model,
@@ -40,8 +40,7 @@
self.valid_senders_methods = {}
self.valid_recipients_methods = {}
self.from_email = ''
self.site_name = 'Example Site Name'
end
-
end
-end
\ No newline at end of file
+end