Class: Lilypad::Log

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

Defined Under Namespace

Modules: Methods

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, response) ⇒ Log

Returns a new instance of Log.



4
5
6
7
8
# File 'lib/lilypad/log.rb', line 4

def initialize(type, response)
  @response = response
  @type = type
  self.class.log title, xml_request, response_body
end

Class Method Details

.log(*lines) ⇒ Object



12
13
14
15
16
# File 'lib/lilypad/log.rb', line 12

def log(*lines)
  ::File.open Config.log, 'a' do |f|
    f.write lines.compact.join("\n\n") + "\n\n"
  end
end