Class: Naf::LoggerStyle

Inherits:
NafBase show all
Defined in:
app/models/naf/logger_style.rb

Instance Method Summary collapse

Methods inherited from NafBase

full_table_name_prefix

Instance Method Details

#_logger_namesObject


*** Instance Methods *** +++++++++++++++++++++++++



33
34
35
36
37
# File 'app/models/naf/logger_style.rb', line 33

def _logger_names
  logger_style_names.map do |lsn|
    lsn.logger_name.name
  end.join(', ')
end

#check_logger_style_names_attributesObject



45
46
47
48
49
# File 'app/models/naf/logger_style.rb', line 45

def check_logger_style_names_attributes
  if logger_style_names.map{ |ln| ln.logger_name_id }.uniq!
    errors.add(:logger_name_id, "should be an uniqueness")
  end
end

#logger_levelsObject



39
40
41
42
43
# File 'app/models/naf/logger_style.rb', line 39

def logger_levels
  logger_style_names.map do |lsn|
    lsn.logger_level.level
  end.join(', ')
end