Class: MetOnTheMiddle::Senders::FileSystem
- Defined in:
- lib/met_on_the_middle/senders/file_system.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(path) ⇒ FileSystem
constructor
A new instance of FileSystem.
- #write(request) ⇒ Object
Constructor Details
#initialize(path) ⇒ FileSystem
Returns a new instance of FileSystem.
6 7 8 |
# File 'lib/met_on_the_middle/senders/file_system.rb', line 6 def initialize(path) self.logger = ::Logger.new(path, 2) end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/met_on_the_middle/senders/file_system.rb', line 4 def logger @logger end |
Instance Method Details
#write(request) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/met_on_the_middle/senders/file_system.rb', line 11 def write(request) self.logger.info request.time.to_s do keys = [] request.data.each do |k, v| keys<<"#{k}:#{v}" end keys.join("|") end end |