Class: Inquisitor::Settings
- Inherits:
-
Object
- Object
- Inquisitor::Settings
- Defined in:
- lib/inquisitor/settings.rb
Instance Attribute Summary collapse
-
#check_period ⇒ Object
Returns the value of attribute check_period.
-
#mail_from ⇒ Object
Returns the value of attribute mail_from.
-
#mail_subject ⇒ Object
Returns the value of attribute mail_subject.
Instance Method Summary collapse
- #db_path=(path) ⇒ Object
-
#initialize ⇒ Settings
constructor
A new instance of Settings.
- #set(params) ⇒ Object
Constructor Details
#initialize ⇒ Settings
Returns a new instance of Settings.
5 6 7 8 9 |
# File 'lib/inquisitor/settings.rb', line 5 def initialize self.mail_from = '[email protected]' self.mail_subject = 'Subject for Inquisitor notify letter' self.check_period = 30 end |
Instance Attribute Details
#check_period ⇒ Object
Returns the value of attribute check_period.
3 4 5 |
# File 'lib/inquisitor/settings.rb', line 3 def check_period @check_period end |
#mail_from ⇒ Object
Returns the value of attribute mail_from.
3 4 5 |
# File 'lib/inquisitor/settings.rb', line 3 def mail_from @mail_from end |
#mail_subject ⇒ Object
Returns the value of attribute mail_subject.
3 4 5 |
# File 'lib/inquisitor/settings.rb', line 3 def mail_subject @mail_subject end |
Instance Method Details
#db_path=(path) ⇒ Object
11 12 13 14 |
# File 'lib/inquisitor/settings.rb', line 11 def db_path=(path) DataMapper.setup(:default, path) DataMapper.auto_upgrade! end |
#set(params) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/inquisitor/settings.rb', line 16 def set(params) params.each do |key, value| if respond_to?("#{key}=") send("#{key}=", value) end end end |