Class: Ayadn::SetBackup
Instance Attribute Summary
Attributes inherited from SetBase
Instance Method Summary collapse
-
#initialize ⇒ SetBackup
constructor
A new instance of SetBackup.
- #method_missing(meth, options) ⇒ Object
- #validate(value) ⇒ Object
Methods inherited from SetBase
Constructor Details
#initialize ⇒ SetBackup
Returns a new instance of SetBackup.
373 374 375 376 |
# File 'lib/ayadn/set.rb', line 373 def initialize super @category = 'backup' end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, options) ⇒ Object
382 383 384 385 386 387 388 389 390 391 |
# File 'lib/ayadn/set.rb', line 382 def method_missing(meth, ) @input = meth.to_s @output = validate() case @input when 'auto_save_sent_posts', 'auto_save_sent_messages', 'auto_save_lists' Settings.[:backup][meth.to_sym] = @output else super end end |
Instance Method Details
#validate(value) ⇒ Object
378 379 380 |
# File 'lib/ayadn/set.rb', line 378 def validate(value) Validators.boolean(value) end |