diff options
Diffstat (limited to 'lib/oxidized/input/cli.rb')
-rw-r--r-- | lib/oxidized/input/cli.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/oxidized/input/cli.rb b/lib/oxidized/input/cli.rb index 8daddac..ab93b06 100644 --- a/lib/oxidized/input/cli.rb +++ b/lib/oxidized/input/cli.rb @@ -1,7 +1,7 @@ module Oxidized class Input module CLI - + def initialize @post_login = [] @pre_logout = [] @@ -17,13 +17,13 @@ module Oxidized def disconnect_cli @pre_logout.each { |command, block| block ? block.call : (cmd command) } end - + def post_login _post_login=nil, &block unless @exec @post_login << [_post_login, block] end end - + def pre_logout _pre_logout=nil, &block unless @exec @pre_logout << [_pre_logout, block] |