Class: Bridgetown::Container::Interceptor
- Inherits:
-
Object
- Object
- Bridgetown::Container::Interceptor
- Defined in:
- bridgetown-core/lib/bridgetown-core/container/interceptor.rb
Instance Attribute Summary collapse
-
#reader ⇒ Object
readonly
Returns the value of attribute reader.
-
#writer ⇒ Object
readonly
Returns the value of attribute writer.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#reader ⇒ Object (readonly)
Returns the value of attribute reader.
5 6 7 |
# File 'bridgetown-core/lib/bridgetown-core/container/interceptor.rb', line 5 def reader @reader end |
#writer ⇒ Object (readonly)
Returns the value of attribute writer.
5 6 7 |
# File 'bridgetown-core/lib/bridgetown-core/container/interceptor.rb', line 5 def writer @writer end |
Class Method Details
.with_tag(tag, color:) ⇒ Object
7 8 9 |
# File 'bridgetown-core/lib/bridgetown-core/container/interceptor.rb', line 7 def self.with_tag(tag, color:) new(tag, color: color) end |
Instance Method Details
#hook ⇒ Object
11 12 13 14 15 |
# File 'bridgetown-core/lib/bridgetown-core/container/interceptor.rb', line 11 def hook $stdin.reopen(@reader) $stdout.reopen(@writer) $stderr.reopen(@writer) end |