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
.getIo ⇒ Object
Get @@io.
524 525 526 |
# File 'lib/como.rb', line 524 def ComoCommon.getIo @@io end |
.runHook(name, args) { ... } ⇒ Object
Run hook.
540 541 542 |
# File 'lib/como.rb', line 540 def ComoCommon.runHook( name, args ) @@hook[ name ].yield( args ) if @@hook[ name ] end |
.setHook(name) { ... } ⇒ Object
Set hook content.
532 533 534 |
# File 'lib/como.rb', line 532 def ComoCommon.setHook( name, &code ) @@hook[ name ] = code end |
.setIo(io) ⇒ Object
Set @@io.
519 520 521 |
# File 'lib/como.rb', line 519 def ComoCommon.setIo( io ) @@io = io end |