Class: Ayadn::SetTimeline
- Inherits:
-
Object
- Object
- Ayadn::SetTimeline
- Defined in:
- lib/ayadn/set.rb
Instance Method Summary collapse
- #annotations(value) ⇒ Object
- #deleted(value) ⇒ Object
- #directed(value) ⇒ Object
- #html(value) ⇒ Object
-
#initialize ⇒ SetTimeline
constructor
A new instance of SetTimeline.
- #log(args) ⇒ Object
- #save ⇒ Object
- #show_date(value) ⇒ Object
- #show_debug(value) ⇒ Object
- #show_nicerank(value) ⇒ Object
- #show_real_name(value) ⇒ Object
- #show_source(value) ⇒ Object
- #show_spinner(value) ⇒ Object
- #show_symbols(value) ⇒ Object
- #validate(value) ⇒ Object
Constructor Details
#initialize ⇒ SetTimeline
Returns a new instance of SetTimeline.
342 343 344 345 346 347 |
# File 'lib/ayadn/set.rb', line 342 def initialize Settings.load_config Settings.get_token Settings.init_config Logs.create_logger end |
Instance Method Details
#annotations(value) ⇒ Object
369 370 371 372 |
# File 'lib/ayadn/set.rb', line 369 def annotations(value) #Settings.options[:timeline][:annotations] = value abort(Status.not_mutable) end |
#deleted(value) ⇒ Object
362 363 364 365 |
# File 'lib/ayadn/set.rb', line 362 def deleted(value) #Settings.options[:timeline][:deleted] = value abort(Status.not_mutable) end |
#directed(value) ⇒ Object
359 360 361 |
# File 'lib/ayadn/set.rb', line 359 def directed(value) Settings.[:timeline][:directed] = value end |
#html(value) ⇒ Object
366 367 368 |
# File 'lib/ayadn/set.rb', line 366 def html(value) Settings.[:timeline][:html] = value end |
#log(args) ⇒ Object
351 352 353 354 355 |
# File 'lib/ayadn/set.rb', line 351 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
356 357 358 |
# File 'lib/ayadn/set.rb', line 356 def save Settings.save_config end |
#show_date(value) ⇒ Object
382 383 384 |
# File 'lib/ayadn/set.rb', line 382 def show_date(value) Settings.[:timeline][:show_date] = value end |
#show_debug(value) ⇒ Object
401 402 403 404 405 406 |
# File 'lib/ayadn/set.rb', line 401 def show_debug value unless Settings.[:colors][:debug] Settings.[:colors][:debug] = :cyan end Settings.[:timeline][:show_debug] = value end |
#show_nicerank(value) ⇒ Object
385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/ayadn/set.rb', line 385 def show_nicerank value unless Settings.[:nicerank] Settings.[:nicerank] = { threshold: 2.1, filter: true, filter_unranked: false } end unless Settings.[:colors][:nicerank] Settings.[:colors][:nicerank] = :cyan end Settings.[:timeline][:show_nicerank] = value end |
#show_real_name(value) ⇒ Object
379 380 381 |
# File 'lib/ayadn/set.rb', line 379 def show_real_name(value) Settings.[:timeline][:show_real_name] = value end |
#show_source(value) ⇒ Object
373 374 375 |
# File 'lib/ayadn/set.rb', line 373 def show_source(value) Settings.[:timeline][:show_source] = value end |
#show_spinner(value) ⇒ Object
398 399 400 |
# File 'lib/ayadn/set.rb', line 398 def show_spinner value Settings.[:timeline][:show_spinner] = value end |
#show_symbols(value) ⇒ Object
376 377 378 |
# File 'lib/ayadn/set.rb', line 376 def show_symbols(value) Settings.[:timeline][:show_symbols] = value end |
#validate(value) ⇒ Object
348 349 350 |
# File 'lib/ayadn/set.rb', line 348 def validate(value) Validators.boolean(value) end |