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
- @@io =
Default value for display output.
STDOUT
- @@hook =
Hooks.
{}
Class Method Summary (collapse)
-
+ (Object) getIo
Get @@io.
-
+ (Object) runHook(name, args) { ... }
Run hook.
-
+ (Object) setHook(name) { ... }
Set hook content.
-
+ (Object) setIo(io)
Set @@io.
Class Method Details
+ (Object) getIo
Get @@io.
490 491 492 |
# File 'lib/como.rb', line 490 def ComoCommon.getIo @@io end |
+ (Object) runHook(name, args) { ... }
Run hook.
506 507 508 |
# File 'lib/como.rb', line 506 def ComoCommon.runHook( name, args ) @@hook[ name ].yield( args ) if @@hook[ name ] end |
+ (Object) setHook(name) { ... }
Set hook content.
498 499 500 |
# File 'lib/como.rb', line 498 def ComoCommon.setHook( name, &code ) @@hook[ name ] = code end |
+ (Object) setIo(io)
Set @@io.
485 486 487 |
# File 'lib/como.rb', line 485 def ComoCommon.setIo( io ) @@io = io end |