Module: Dirby

Defined in:
lib/dirby/history.rb,
lib/dirby.rb,
lib/dirby/version.rb,
lib/dirby/colorize.rb

Overview

This file is part of Dirby.

Foobar is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Foobar.  If not, see <http://www.gnu.org/licenses/>.

Defined Under Namespace

Modules: Colorize Classes: History

Constant Summary collapse

LIBRARIES =

Libraries to be loaded at startup

%w{pp irb/completion}
VERSION =
"0.2"

Class Method Summary collapse

Class Method Details

.init(opts = {}) ⇒ Object

Initialize the runtime environment.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/dirby.rb', line 26

def self.init(opts = {})
  puts "USING DIRBY #{Dirby::VERSION}"

  LIBRARIES.each do |lib|
    begin
      require lib
    rescue LoadError
      nil
    end
  end

  # enable loading/saving history
  History.new(opts) unless opts[:skip_history]

  # enable colorized output
  Colorize.enable(nil)
end