Class: Ayadn::SetChannels
Instance Attribute Summary
Attributes inherited from SetBase
Instance Method Summary collapse
-
#initialize ⇒ SetChannels
constructor
A new instance of SetChannels.
- #method_missing(meth, options) ⇒ Object
- #validate(value) ⇒ Object
Methods inherited from SetBase
Constructor Details
#initialize ⇒ SetChannels
Returns a new instance of SetChannels.
558 559 560 561 |
# File 'lib/ayadn/set.rb', line 558 def initialize super @category = 'channels' end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, options) ⇒ Object
567 568 569 570 571 572 573 574 575 576 |
# File 'lib/ayadn/set.rb', line 567 def method_missing(meth, ) @input = meth.to_s @output = validate() case @input when 'links' Settings.[:channels][meth.to_sym] = @output else super end end |
Instance Method Details
#validate(value) ⇒ Object
563 564 565 |
# File 'lib/ayadn/set.rb', line 563 def validate(value) Validators.boolean(value) end |