Sha256: 34f34bf4876edffcbfb7d52175c417ec50805d5a9a91f358406dfad6200c3de4

Contents?: true

Size: 496 Bytes

Versions: 25

Compression:

Stored size: 496 Bytes

Contents

module Rib; end
module Rib::Ramaze
  module_function
  def load
    load_ramaze
  rescue LoadError => e
    Rib.abort("Error: #{e}", "Is this a Ramaze app?")
  end

  def load_ramaze
    # try to produce consistent error message, and yet lazy loading ramaze
    require './start' unless ramaze?

    require 'ramaze'
    ::Ramaze.options.started = true

    require './start'
    at_exit{ puts('Ramazement has ended, go in peace.') }
  end

  def ramaze?
    File.exist?('./start.rb')
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
rib-1.0.3 lib/rib/app/ramaze.rb
rib-1.0.2 lib/rib/app/ramaze.rb
rib-1.0.1 lib/rib/app/ramaze.rb
rib-1.0.0 lib/rib/app/ramaze.rb
rib-0.9.9 lib/rib/app/ramaze.rb