Skip to content

Instantly share code, notes, and snippets.

@tranvictor
Created January 16, 2015 02:46
Show Gist options
  • Save tranvictor/e826492ff9b3283b2526 to your computer and use it in GitHub Desktop.
Save tranvictor/e826492ff9b3283b2526 to your computer and use it in GitHub Desktop.
# in lib/lotus/commands/console.rb
def load_engine(engine)
require engine
rescue LoadError
ensure
return Object.const_get(
ENGINES.fetch(engine) {
raise ArgumentError.new("Unknown console engine: #{ engine }")
}
).tap do |engine_obj|
# im trying to set the configuration here
engine_obj.conf[:SAVE_HISTORY] = 1000 if engine_obj.name == 'IRB'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment