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.



409
410
411
412
# File 'lib/ayadn/set.rb', line 409

def initialize
  super
  @category = 'marker'
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, options) ⇒ Object



418
419
420
421
422
423
424
425
426
427
# File 'lib/ayadn/set.rb', line 418

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

Instance Method Details

#validate(value) ⇒ Object



414
415
416
# File 'lib/ayadn/set.rb', line 414

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