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.



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

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.



238
239
240
# File 'lib/ayadn/set.rb', line 238

def category
  @category
end

#inputObject

Returns the value of attribute input.



238
239
240
# File 'lib/ayadn/set.rb', line 238

def input
  @input
end

#outputObject

Returns the value of attribute output.



238
239
240
# File 'lib/ayadn/set.rb', line 238

def output
  @output
end

Instance Method Details

#logObject



252
253
254
255
256
# File 'lib/ayadn/set.rb', line 252

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

#saveObject



247
248
249
250
# File 'lib/ayadn/set.rb', line 247

def save
  Settings.save_config()
  log()
end