Class: Ayadn::SetTimeline

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

#initializeSetTimeline

Returns a new instance of SetTimeline.



630
631
632
633
# File 'lib/ayadn/set.rb', line 630

def initialize
  super
  @category = 'timeline'
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, options) ⇒ Object



639
640
641
642
643
644
645
646
647
648
# File 'lib/ayadn/set.rb', line 639

def method_missing(meth, options)
  @input = meth.to_s
  @output = validate(options)
  case @input
  when 'directed', 'source', 'symbols', 'name', 'date', 'debug', 'compact'
    Settings.options[:timeline][meth.to_sym] = @output
  else
    super
  end
end

Instance Method Details

#validate(value) ⇒ Object



635
636
637
# File 'lib/ayadn/set.rb', line 635

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