Class: Como::ComoCommon
- Inherits:
-
Object
- Object
- Como::ComoCommon
- Defined in:
- lib/como.rb
Overview
IO stream options for Como classes.
Direct Known Subclasses
Constant Summary collapse
- @@io =
Default value for display output.
STDOUT
- @@hook =
Hooks.
{}
Class Method Summary collapse
-
.getIo ⇒ Object
Get @@io.
-
.runHook(name, args) { ... } ⇒ Object
Run hook.
-
.setHook(name) { ... } ⇒ Object
Set hook content.
-
.setIo(io) ⇒ Object
Set @@io.
Class Method Details
.runHook(name, args) { ... } ⇒ Object
Run hook.
555 556 557 |
# File 'lib/como.rb', line 555 def ComoCommon.runHook( name, args ) @@hook[ name ].yield( args ) if @@hook[ name ] end |
.setHook(name) { ... } ⇒ Object
Set hook content.
547 548 549 |
# File 'lib/como.rb', line 547 def ComoCommon.setHook( name, &code ) @@hook[ name ] = code end |
.setIo(io) ⇒ Object
Set @@io.
534 535 536 |
# File 'lib/como.rb', line 534 def ComoCommon.setIo( io ) @@io = io end |