Sha256: a549fef0a9c5925b50fe2ab0f3ecc98bf73064fee24982900419be26398a893b

Contents?: true

Size: 631 Bytes

Versions: 8

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/patches/object/if_present'

module EacRubyUtils
  module Console
    module Speaker
      class Node
        attr_accessor :stdin, :stdout, :stderr, :stderr_line_prefix

        def initialize(parent = nil)
          self.stdin = parent.if_present(STDIN, &:stdin)
          self.stdout = parent.if_present(STDOUT, &:stdout)
          self.stderr = parent.if_present(STDERR, &:stderr)
          self.stderr_line_prefix = parent.if_present('', &:stderr_line_prefix)
        end

        def configure
          yield(self)
          self
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
ehbrs-tools-0.3.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/node.rb
eac_ruby_utils-0.23.0 lib/eac_ruby_utils/console/speaker/node.rb
eac_ruby_utils-0.22.0 lib/eac_ruby_utils/console/speaker/node.rb
eac_ruby_utils-0.21.0 lib/eac_ruby_utils/console/speaker/node.rb
eac_ruby_utils-0.20.0 lib/eac_ruby_utils/console/speaker/node.rb
eac_ruby_utils-0.19.0 lib/eac_ruby_utils/console/speaker/node.rb
eac_ruby_utils-0.18.1 lib/eac_ruby_utils/console/speaker/node.rb
eac_ruby_utils-0.18.0 lib/eac_ruby_utils/console/speaker/node.rb