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.



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

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

Instance Attribute Details

#stderrObject

Returns the value of attribute stderr.



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

def stderr
  @stderr
end

#stderr_line_prefixObject

Returns the value of attribute stderr_line_prefix.



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

def stderr_line_prefix
  @stderr_line_prefix
end

#stdinObject

Returns the value of attribute stdin.



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

def stdin
  @stdin
end

#stdoutObject

Returns the value of attribute stdout.



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

def stdout
  @stdout
end

Instance Method Details

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

Yields:

  • (_self)

Yield Parameters:



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

def configure
  yield(self)
  self
end