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.



482
483
484
485
# File 'lib/ayadn/set.rb', line 482

def initialize
  super
  @category = 'marker'
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, options) ⇒ Object



491
492
493
494
495
496
497
498
499
500
# File 'lib/ayadn/set.rb', line 491

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

Instance Method Details

#validate(value) ⇒ Object



487
488
489
# File 'lib/ayadn/set.rb', line 487

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