Class: Ayadn::SetBase

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSetBase

Returns a new instance of SetBase.



228
229
230
231
232
233
# File 'lib/ayadn/set.rb', line 228

def initialize
  Settings.load_config()
  Settings.get_token()
  Settings.init_config()
  Logs.create_logger()
end

Instance Attribute Details

#categoryObject

Returns the value of attribute category.



226
227
228
# File 'lib/ayadn/set.rb', line 226

def category
  @category
end

#inputObject

Returns the value of attribute input.



226
227
228
# File 'lib/ayadn/set.rb', line 226

def input
  @input
end

#outputObject

Returns the value of attribute output.



226
227
228
# File 'lib/ayadn/set.rb', line 226

def output
  @output
end

Instance Method Details

#logObject



240
241
242
243
244
# File 'lib/ayadn/set.rb', line 240

def log
  x = "New value for '#{@input}' in '#{@category}' => #{@output}"
  puts "\n#{x}\n".color(:cyan)
  Logs.rec.info x
end

#saveObject



235
236
237
238
# File 'lib/ayadn/set.rb', line 235

def save
  Settings.save_config()
  log()
end