Class: Press::Logger

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ Logger

Returns a new instance of Logger.



60
61
62
# File 'lib/press.rb', line 60

def initialize(type)
  @type = type
end

Class Method Details

.level(*attrs) ⇒ Object



52
53
54
55
56
# File 'lib/press.rb', line 52

def self.level(*attrs)
  attrs.each do |attr|
    class_eval "def #{attr} args; Printer.pd :type => @type, :level => '#{attr}', :message => args end", __FILE__, __LINE__
  end
end