Class: Ayadn::SetTimeline
Instance Attribute Summary
Attributes inherited from SetBase
Instance Method Summary collapse
-
#initialize ⇒ SetTimeline
constructor
A new instance of SetTimeline.
- #method_missing(meth, options) ⇒ Object
- #validate(value) ⇒ Object
Methods inherited from SetBase
Constructor Details
#initialize ⇒ SetTimeline
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, ) @input = meth.to_s @output = validate() case @input when 'directed' Settings..timeline.directed = @output when 'source' Settings..timeline.source = @output when 'symbols' Settings..timeline.symbols = @output when 'name' Settings..timeline.name = @output when 'date' Settings..timeline.date = @output when 'debug' Settings..timeline.debug = @output when 'compact' Settings..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 |