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.



608
609
610
611
# File 'lib/ayadn/set.rb', line 608

def initialize
  super
  @category = 'timeline'
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, options) ⇒ Object



617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
# File 'lib/ayadn/set.rb', line 617

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

Instance Method Details

#validate(value) ⇒ Object



613
614
615
# File 'lib/ayadn/set.rb', line 613

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