Sha256: b8ea4493d66b66354a3d0ee6f8acaa7199253c08df4e6518ba4d3f7d689645cd

Contents?: true

Size: 680 Bytes

Versions: 2

Compression:

Stored size: 680 Bytes

Contents

# Begin a new Capybara session, by default connecting to localhost on port
# 3000.
def session
  Capybara.app_host = "http://localhost:3000"
  @session ||= Capybara::Session.new(:Akephalos)
end
alias page session

module Akephalos
  # Simple class for starting an IRB session.
  class Console

    # Start an IRB session. Tries to load irb/completion, and also loads a
    # .irbrc file if it exists.
    def self.start
      require 'irb'

      begin
        require 'irb/completion'
      rescue Exception
        # No readline available, proceed anyway.
      end

      if ::File.exists? ".irbrc"
        ENV['IRBRC'] = ".irbrc"
      end

      IRB.start
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
akephalos-0.2.4-java lib/akephalos/console.rb
akephalos-0.2.4 lib/akephalos/console.rb