Class: Ayadn::SetTimeline

Inherits:
SetBase
  • Object
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.



457
458
459
460
# File 'lib/ayadn/set.rb', line 457

def initialize
  super
  @category = 'timeline'
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, options) ⇒ Object



466
467
468
469
470
471
472
473
474
475
476
477
# File 'lib/ayadn/set.rb', line 466

def method_missing(meth, options)
  @input = meth.to_s
  @output = validate(options)
  case @input
  when 'directed', 'html', 'show_source', 'show_symbols', 'show_real_name', 'show_date', 'show_spinner', 'show_debug', 'compact', 'show_channel_oembed'
    Settings.options[:timeline][meth.to_sym] = @output
  when 'deleted', 'annotations'
    abort(Status.not_mutable)
  else
    super
  end
end

Instance Method Details

#validate(value) ⇒ Object



462
463
464
# File 'lib/ayadn/set.rb', line 462

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