Class: Ayadn::SetNiceRank
- Inherits:
-
Object
- Object
- Ayadn::SetNiceRank
- Defined in:
- lib/ayadn/set.rb
Instance Method Summary collapse
- #cache(value) ⇒ Object
- #filter(value) ⇒ Object
- #filter_unranked(value) ⇒ Object
-
#initialize ⇒ SetNiceRank
constructor
A new instance of SetNiceRank.
- #log(args) ⇒ Object
- #save ⇒ Object
- #threshold(value) ⇒ Object
Constructor Details
#initialize ⇒ SetNiceRank
Returns a new instance of SetNiceRank.
264 265 266 267 268 269 |
# File 'lib/ayadn/set.rb', line 264 def initialize Settings.load_config Settings.get_token Settings.init_config Logs.create_logger end |
Instance Method Details
#cache(value) ⇒ Object
287 288 289 |
# File 'lib/ayadn/set.rb', line 287 def cache value Settings.[:nicerank][:cache] = Validators.cache_range value.to_i end |
#filter(value) ⇒ Object
278 279 280 |
# File 'lib/ayadn/set.rb', line 278 def filter value Settings.[:nicerank][:filter] = Validators.boolean(value) end |
#filter_unranked(value) ⇒ Object
281 282 283 |
# File 'lib/ayadn/set.rb', line 281 def filter_unranked value Settings.[:nicerank][:filter_unranked] = Validators.boolean(value) end |
#log(args) ⇒ Object
270 271 272 273 274 |
# File 'lib/ayadn/set.rb', line 270 def log(args) x = "New value for '#{args[0]}' in 'NiceRank' => #{args[1]}" puts "\n#{x}\n".color(:cyan) Logs.rec.info x end |
#save ⇒ Object
275 276 277 |
# File 'lib/ayadn/set.rb', line 275 def save Settings.save_config end |
#threshold(value) ⇒ Object
284 285 286 |
# File 'lib/ayadn/set.rb', line 284 def threshold value Settings.[:nicerank][:threshold] = Validators.threshold value end |