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.
454 455 456 457 |
# File 'lib/ayadn/set.rb', line 454 def initialize super @category = 'backup' end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, options) ⇒ Object
463 464 465 466 467 468 469 470 471 472 473 474 475 476 |
# File 'lib/ayadn/set.rb', line 463 def method_missing(meth, ) @input = meth.to_s @output = validate() case @input when 'posts' Settings..backup.posts = @output when 'messages' Settings..backup. = @output when 'lists' Settings..backup.lists = @output else super end end |
Instance Method Details
#validate(value) ⇒ Object
459 460 461 |
# File 'lib/ayadn/set.rb', line 459 def validate(value) Validators.boolean(value) end |