Class: EacRubyUtils::Console::Speaker::Node
- Defined in:
- lib/eac_ruby_utils/console/speaker/node.rb
Instance Attribute Summary collapse
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stderr_line_prefix ⇒ Object
Returns the value of attribute stderr_line_prefix.
-
#stdin ⇒ Object
Returns the value of attribute stdin.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
-
#initialize(parent = nil) ⇒ Node
constructor
A new instance of Node.
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
#stderr ⇒ Object
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_prefix ⇒ Object
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 |
#stdin ⇒ Object
Returns the value of attribute stdin.
9 10 11 |
# File 'lib/eac_ruby_utils/console/speaker/node.rb', line 9 def stdin @stdin end |
#stdout ⇒ Object
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
18 19 20 21 |
# File 'lib/eac_ruby_utils/console/speaker/node.rb', line 18 def configure yield(self) self end |