Class: Como::ComoCommon

Inherits:
Object
  • Object
show all
Defined in:
lib/como.rb,
lib/version.rb

Overview

IO stream options for Como classes.

Direct Known Subclasses

Opt, RuleDisplay, Spec

Constant Summary

VERSION =
"0.1.3"
@@io =

Default value for display output.

STDOUT
@@hook =

Hooks.

{}

Class Method Summary (collapse)

Class Method Details

+ (Object) getIo

Get @@io.



480
481
482
# File 'lib/como.rb', line 480

def ComoCommon.getIo
    @@io
end

+ (Object) runHook(name, args)



488
489
490
# File 'lib/como.rb', line 488

def ComoCommon.runHook( name, args )
    @@hook[ name ].yield( args ) if @@hook[ name ]
end

+ (Object) setHook(name, &code)



484
485
486
# File 'lib/como.rb', line 484

def ComoCommon.setHook( name, &code )
    @@hook[ name ] = code
end

+ (Object) setIo(io)

Set @@io.



475
476
477
# File 'lib/como.rb', line 475

def ComoCommon.setIo( io )
    @@io = io
end