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