# module Sass::Logger::LogLevel::ClassMethods

### Attributes

log_levels[W]

### Public Instance Methods

define_logger(name, options = {}) click to toggle source

    # File lib/sass/logger/log_level.rb, line 35
            def define_logger(name, options = {})
              class_eval <<-RUBY, __FILE__, __LINE__ + 1
                def #{name}(message)
                  #{options.fetch(:to, :log)}(#{name.inspect}, message)
                end
              RUBY
            end

inherited(subclass) click to toggle source

    # File lib/sass/logger/log_level.rb, line 9
    def inherited(subclass)
      subclass.log_levels = subclass.superclass.log_levels.dup
    end

log_level(name, options = {}) click to toggle source

    # File lib/sass/logger/log_level.rb, line 23
    def log_level(name, options = {})
      if options[:prepend]
        level = log_levels.values.min
        level = level.nil? ? 0 : level - 1
      else
        level = log_levels.values.max
        level = level.nil? ? 0 : level + 1
      end
      log_levels.update(name => level)
      define_logger(name)
    end

log_level?(level, min_level) click to toggle source

    # File lib/sass/logger/log_level.rb, line 19
    def log_level?(level, min_level)
      log_levels[level] >= log_levels[min_level]
    end

log_levels() click to toggle source

    # File lib/sass/logger/log_level.rb, line 15
    def log_levels
      @log_levels ||= {}
    end