Class: Ayadn::SetMarker

Inherits:
SetBase show all
Defined in:
lib/ayadn/set.rb

Instance Attribute Summary

Attributes inherited from SetBase

#category, #input, #output

Instance Method Summary collapse

Methods inherited from SetBase

#log, #save

Constructor Details

#initializeSetMarker

Returns a new instance of SetMarker.



534
535
536
537
# File 'lib/ayadn/set.rb', line 534

def initialize
  super
  @category = 'marker'
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, options) ⇒ Object



543
544
545
546
547
548
549
550
551
552
# File 'lib/ayadn/set.rb', line 543

def method_missing(meth, options)
  @input = meth.to_s
  @output = validate(options)
  case @input
  when 'messages'
    Settings.options[:marker][meth.to_sym] = @output
  else
    super
  end
end

Instance Method Details

#validate(value) ⇒ Object



539
540
541
# File 'lib/ayadn/set.rb', line 539

def validate(value)
  Validators.boolean(value)
end