Class: Ayadn::SetBase
Direct Known Subclasses
SetAPI, SetBackup, SetBlacklist, SetChannels, SetColor, SetCounts, SetFormats, SetMarker, SetMovie, SetNiceRank, SetScroll, SetTVShow, 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.
320 321 322 323 324 325 326 |
# File 'lib/ayadn/set.rb', line 320 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.
318 319 320 |
# File 'lib/ayadn/set.rb', line 318 def category @category end |
#input ⇒ Object
Returns the value of attribute input.
318 319 320 |
# File 'lib/ayadn/set.rb', line 318 def input @input end |
#output ⇒ Object
Returns the value of attribute output.
318 319 320 |
# File 'lib/ayadn/set.rb', line 318 def output @output end |
Instance Method Details
#log ⇒ Object
333 334 335 336 337 338 339 |
# File 'lib/ayadn/set.rb', line 333 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
328 329 330 331 |
# File 'lib/ayadn/set.rb', line 328 def save Settings.save_config() log() end |