Sha256: 2ad1633293cf79cdcac216642b3d744272faf70f27c8c91980c717c62817e07d

Contents?: true

Size: 505 Bytes

Versions: 11

Compression:

Stored size: 505 Bytes

Contents

module Rib; end
module Rib::Auto
  module_function
  def load
    app, name = %w[ramaze rails].find{ |name|
      require "rib/app/#{name}"
      app = Rib.const_get(name.capitalize)
      if app.send("#{name}?")
        break app, name
      end
    }

    if app
      Rib.say("Found #{name.capitalize}, loading it...")
      begin
        app.load
      rescue LoadError => e
        Rib.warn("Error: #{e}", "Is this a #{app} app?")
      end
    else
      Rib.warn("No app found")
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rib-1.1.3 lib/rib/app/auto.rb
rib-1.1.2 lib/rib/app/auto.rb
rib-1.1.1 lib/rib/app/auto.rb
rib-1.1.0 lib/rib/app/auto.rb
rib-1.0.5 lib/rib/app/auto.rb
rib-1.0.4 lib/rib/app/auto.rb
rib-1.0.3 lib/rib/app/auto.rb
rib-1.0.2 lib/rib/app/auto.rb
rib-1.0.1 lib/rib/app/auto.rb
rib-1.0.0 lib/rib/app/auto.rb
rib-0.9.9 lib/rib/app/auto.rb