Class: Ayadn::SetTimeline
- Inherits:
-
Object
- Object
- Ayadn::SetTimeline
show all
- Defined in:
- lib/ayadn/set.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of SetTimeline.
349
350
351
352
353
354
|
# File 'lib/ayadn/set.rb', line 349
def initialize
Settings.load_config
Settings.get_token
Settings.init_config
Logs.create_logger
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, options) ⇒ Object
366
367
368
369
370
371
372
373
374
375
|
# File 'lib/ayadn/set.rb', line 366
def method_missing(meth, options)
case meth.to_s
when 'directed', 'html', 'show_source', 'show_symbols', 'show_real_name', 'show_date', 'show_spinner', 'show_debug'
Settings.options[:timeline][meth.to_sym] = options
when 'deleted', 'annotations'
abort(Status.not_mutable)
else
super
end
end
|
Instance Method Details
#log(args) ⇒ Object
358
359
360
361
362
|
# File 'lib/ayadn/set.rb', line 358
def log(args)
x = "New value for '#{args[0]}' in 'Timeline' => #{args[1]}"
puts "\n#{x}\n".color(:cyan)
Logs.rec.info x
end
|
#save ⇒ Object
363
364
365
|
# File 'lib/ayadn/set.rb', line 363
def save
Settings.save_config
end
|
#validate(value) ⇒ Object
355
356
357
|
# File 'lib/ayadn/set.rb', line 355
def validate(value)
Validators.boolean(value)
end
|