Class: Ayadn::SetTimeline

Inherits:
Object
  • Object
show all
Defined in:
lib/ayadn/set.rb

Instance Method Summary collapse

Constructor Details

#initializeSetTimeline

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.options[:timeline][:directed] = value
end

#html(value) ⇒ Object



366
367
368
# File 'lib/ayadn/set.rb', line 366

def html(value)
  Settings.options[: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

#saveObject



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.options[: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.options[:colors][:debug]
    Settings.options[:colors][:debug] = :cyan
  end
  Settings.options[: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.options[:nicerank]
    Settings.options[:nicerank] = {
      threshold: 2.1,
      filter: true,
      filter_unranked: false
    }
  end
  unless Settings.options[:colors][:nicerank]
    Settings.options[:colors][:nicerank] = :cyan
  end
  Settings.options[: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.options[: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.options[:timeline][:show_source] = value
end

#show_spinner(value) ⇒ Object



398
399
400
# File 'lib/ayadn/set.rb', line 398

def show_spinner value
  Settings.options[:timeline][:show_spinner] = value
end

#show_symbols(value) ⇒ Object



376
377
378
# File 'lib/ayadn/set.rb', line 376

def show_symbols(value)
  Settings.options[: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