Sha256: 6f44e767cc99c5d053aea7c2f051a8fb0af988cea9de344c235590c689ed5e13
Contents?: true
Size: 510 Bytes
Versions: 16
Compression:
Stored size: 510 Bytes
Contents
module Rib; end module Rib::Auto module_function def load app, name = %w[ramaze rails rack].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
16 entries across 16 versions & 1 rubygems