Class: EacRubyUtils::Console::Speaker::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/eac_ruby_utils/console/speaker/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent = nil) ⇒ Node

Returns a new instance of Node.


12
13
14
15
16
17
# File 'lib/eac_ruby_utils/console/speaker/node.rb', line 12

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

Instance Attribute Details

#stderrObject

Returns the value of attribute stderr


10
11
12
# File 'lib/eac_ruby_utils/console/speaker/node.rb', line 10

def stderr
  @stderr
end

#stderr_line_prefixObject

Returns the value of attribute stderr_line_prefix


10
11
12
# File 'lib/eac_ruby_utils/console/speaker/node.rb', line 10

def stderr_line_prefix
  @stderr_line_prefix
end

#stdinObject

Returns the value of attribute stdin


10
11
12
# File 'lib/eac_ruby_utils/console/speaker/node.rb', line 10

def stdin
  @stdin
end

#stdoutObject

Returns the value of attribute stdout


10
11
12
# File 'lib/eac_ruby_utils/console/speaker/node.rb', line 10

def stdout
  @stdout
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:


19
20
21
22
# File 'lib/eac_ruby_utils/console/speaker/node.rb', line 19

def configure
  yield(self)
  self
end