Class: Ayadn::SetBlacklist
Instance Attribute Summary
Attributes inherited from SetBase
Instance Method Summary collapse
-
#initialize ⇒ SetBlacklist
constructor
A new instance of SetBlacklist.
- #method_missing(meth, options) ⇒ Object
- #validate(value) ⇒ Object
Methods inherited from SetBase
Constructor Details
#initialize ⇒ SetBlacklist
Returns a new instance of SetBlacklist.
530 531 532 533 |
# File 'lib/ayadn/set.rb', line 530 def initialize super @category = 'blacklist' end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, options) ⇒ Object
539 540 541 542 543 544 545 546 547 548 |
# File 'lib/ayadn/set.rb', line 539 def method_missing(meth, ) @input = meth.to_s @output = validate() case @input when 'active', 'activated' Settings..blacklist.active = @output else super end end |
Instance Method Details
#validate(value) ⇒ Object
535 536 537 |
# File 'lib/ayadn/set.rb', line 535 def validate(value) Validators.boolean(value) end |