Class: Ayadn::SetBase
Direct Known Subclasses
SetAPI, SetBackup, SetBlacklist, SetChannels, SetColor, SetCounts, SetFormats, SetMarker, SetNiceRank, SetScroll, SetTimeline
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#input ⇒ Object
Returns the value of attribute input.
-
#output ⇒ Object
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize ⇒ SetBase
constructor
A new instance of SetBase.
- #log ⇒ Object
- #save ⇒ Object
Constructor Details
#initialize ⇒ SetBase
Returns a new instance of SetBase.
294 295 296 297 298 299 300 |
# File 'lib/ayadn/set.rb', line 294 def initialize Settings.load_config() Settings.get_token() Settings.init_config() Logs.create_logger() @status = Status.new end |
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
292 293 294 |
# File 'lib/ayadn/set.rb', line 292 def category @category end |
#input ⇒ Object
Returns the value of attribute input.
292 293 294 |
# File 'lib/ayadn/set.rb', line 292 def input @input end |
#output ⇒ Object
Returns the value of attribute output.
292 293 294 |
# File 'lib/ayadn/set.rb', line 292 def output @output end |
Instance Method Details
#log ⇒ Object
307 308 309 310 311 312 313 |
# File 'lib/ayadn/set.rb', line 307 def log @status.say do @status.say_cyan :updated, "'#{@input}' in '#{@category}'" @status.say_green :content, "'#{@output}'" end Logs.rec.info "new value for '#{@input}' in '#{@category}' => '#{@output}'" end |
#save ⇒ Object
302 303 304 305 |
# File 'lib/ayadn/set.rb', line 302 def save Settings.save_config() log() end |