Class: Capistrano::Datadog::CaptureIO
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Capistrano::Datadog::CaptureIO
- Defined in:
- lib/capistrano/datadog/v3.rb
Instance Method Summary collapse
-
#initialize(wrapped) ⇒ CaptureIO
constructor
A new instance of CaptureIO.
- #write(*args) ⇒ Object (also: #<<)
Constructor Details
#initialize(wrapped) ⇒ CaptureIO
Returns a new instance of CaptureIO.
46 47 48 49 |
# File 'lib/capistrano/datadog/v3.rb', line 46 def initialize(wrapped) super @wrapped = wrapped end |
Instance Method Details
#write(*args) ⇒ Object Also known as: <<
51 52 53 54 55 56 57 58 59 |
# File 'lib/capistrano/datadog/v3.rb', line 51 def write(*args) # Check if Capistrano version >= 3.5.0 if Gem::Version.new(VERSION) >= Gem::Version.new('3.5.0') @wrapped << args.join else @wrapped.write(*args) end args.each { |arg| Capistrano::Datadog.reporter.record_log(arg) } end |