Class: Lazylead::Task::EchoIO

Inherits:
Object
  • Object
show all
Defined in:
lib/lazylead/task/echo.rb

Overview

Lazylead task which prints the current time to a file.

Author

Yurii Dubinka ([email protected])

Copyright

Copyright © 2019-2020 Yurii Dubinka

License

MIT

Instance Method Summary collapse

Constructor Details

#initialize(log = Log.new, path = "test/resources/echo.txt") ⇒ EchoIO

Returns a new instance of EchoIO.



50
51
52
53
# File 'lib/lazylead/task/echo.rb', line 50

def initialize(log = Log.new, path = "test/resources/echo.txt")
  @log = log
  @path = path
end

Instance Method Details

#run(_, _, _) ⇒ Object



55
56
57
# File 'lib/lazylead/task/echo.rb', line 55

def run(_, _, _)
  File.open(@path, "w") { |f| f.write Time.now }
end