Skip to content

Instantly share code, notes, and snippets.

@jugyo
Created August 14, 2009 02:24
Show Gist options
  • Save jugyo/167604 to your computer and use it in GitHub Desktop.
Save jugyo/167604 to your computer and use it in GitHub Desktop.
diff --git a/lib/termtter/client.rb b/lib/termtter/client.rb
index d28e242..eceb371 100644
--- a/lib/termtter/client.rb
+++ b/lib/termtter/client.rb
@@ -296,16 +296,22 @@ module Termtter
@init_block = block
end
+ def load_plugins
+ plug 'defaults'
+ plug 'devel' if config.devel
+ plug config.system.load_plugins
+ end
+
+ def eval_init_block
+ @init_block.call(self) if @init_block
+ end
+
def run
load_config()
Termtter::API.setup()
setup_logger()
-
- @init_block.call(self) if @init_block
-
- plug 'defaults'
- plug 'devel' if config.devel
- plug config.system.load_plugins
+ load_plugins()
+ eval_init_block()
config.system.eval_scripts.each do |script|
begin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment