Class: Ayadn::SetBase
- Inherits:
-
Object
- Object
- Ayadn::SetBase
- Defined in:
- lib/ayadn/set.rb
Direct Known Subclasses
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
269 270 271 272 273 274 275 276 |
# File 'lib/ayadn/set.rb', line 269 def initialize Settings.load_config() Settings.get_token() Settings.init_config() Logs.create_logger() @thor = Thor::Shell::Color.new @status = Status.new end |
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
267 268 269 |
# File 'lib/ayadn/set.rb', line 267 def category @category end |
#input ⇒ Object
Returns the value of attribute input.
267 268 269 |
# File 'lib/ayadn/set.rb', line 267 def input @input end |
#output ⇒ Object
Returns the value of attribute output.
267 268 269 |
# File 'lib/ayadn/set.rb', line 267 def output @output end |
Instance Method Details
#log ⇒ Object
283 284 285 286 287 288 289 |
# File 'lib/ayadn/set.rb', line 283 def log @status.say do @thor.say_status(:updated, "'#{@input}' in '#{@category}'", :cyan) @thor.say_status(:content, "'#{@output}'", :green) end Logs.rec.info "new value for '#{@input}' in '#{@category}' => '#{@output}'" end |
#save ⇒ Object
278 279 280 281 |
# File 'lib/ayadn/set.rb', line 278 def save Settings.save_config() log() end |