Module: Ramaze
- Extended by:
- Innate::SingletonMethods
- Defined in:
- lib/ramaze.rb,
lib/ramaze/app.rb,
lib/ramaze/log.rb,
lib/ramaze/spec.rb,
lib/ramaze/view.rb,
lib/ramaze/cache.rb,
lib/ramaze/files.rb,
lib/ramaze/setup.rb,
lib/ramaze/helper.rb,
lib/ramaze/plugin.rb,
lib/ramaze/current.rb,
lib/ramaze/gestalt.rb,
lib/ramaze/log/hub.rb,
lib/ramaze/request.rb,
lib/ramaze/version.rb,
lib/ramaze/log/xosd.rb,
lib/ramaze/reloader.rb,
lib/ramaze/response.rb,
lib/ramaze/log/growl.rb,
lib/ramaze/view/haml.rb,
lib/ramaze/view/sass.rb,
lib/ramaze/view/tagz.rb,
lib/ramaze/controller.rb,
lib/ramaze/log/logger.rb,
lib/ramaze/log/syslog.rb,
lib/ramaze/helper/auth.rb,
lib/ramaze/helper/form.rb,
lib/ramaze/helper/link.rb,
lib/ramaze/helper/tagz.rb,
lib/ramaze/helper/user.rb,
lib/ramaze/log/knotify.rb,
lib/ramaze/log/logging.rb,
lib/ramaze/tool/create.rb,
lib/ramaze/view/erubis.rb,
lib/ramaze/view/ezamar.rb,
lib/ramaze/view/liquid.rb,
lib/ramaze/view/maruku.rb,
lib/ramaze/view/nagoro.rb,
lib/ramaze/view/tenjin.rb,
lib/ramaze/cache/sequel.rb,
lib/ramaze/contrib/rest.rb,
lib/ramaze/helper/bench.rb,
lib/ramaze/helper/cache.rb,
lib/ramaze/helper/flash.rb,
lib/ramaze/helper/pager.rb,
lib/ramaze/helper/stack.rb,
lib/ramaze/helper/xhtml.rb,
lib/ramaze/log/informer.rb,
lib/ramaze/contrib/email.rb,
lib/ramaze/helper/disqus.rb,
lib/ramaze/helper/maruku.rb,
lib/ramaze/helper/sequel.rb,
lib/ramaze/helper/thread.rb,
lib/ramaze/log/analogger.rb,
lib/ramaze/view/redcloth.rb,
lib/ramaze/cache/memcache.rb,
lib/ramaze/helper/gestalt.rb,
lib/ramaze/helper/markaby.rb,
lib/ramaze/helper/partial.rb,
lib/ramaze/contrib/gettext.rb,
lib/ramaze/helper/gravatar.rb,
lib/ramaze/helper/identity.rb,
lib/ramaze/helper/localize.rb,
lib/ramaze/helper/paginate.rb,
lib/ramaze/view/remarkably.rb,
lib/ramaze/contrib/facebook.rb,
lib/ramaze/helper/nitroform.rb,
lib/ramaze/contrib/profiling.rb,
lib/ramaze/helper/formatting.rb,
lib/ramaze/helper/httpdigest.rb,
lib/ramaze/helper/remarkably.rb,
lib/ramaze/controller/default.rb,
lib/ramaze/helper/sequel_form.rb,
lib/ramaze/helper/ultraviolet.rb,
lib/ramaze/cache/localmemcache.rb,
lib/ramaze/middleware_compiler.rb,
lib/ramaze/reloader/watch_stat.rb,
lib/ramaze/snippets/string/esc.rb,
lib/ramaze/snippets/string/ord.rb,
lib/ramaze/log/rotatinginformer.rb,
lib/ramaze/snippets/proc/locals.rb,
lib/ramaze/snippets/string/each.rb,
lib/ramaze/helper/simple_captcha.rb,
lib/ramaze/snippets/numeric/time.rb,
lib/ramaze/snippets/object/scope.rb,
lib/ramaze/snippets/ramaze/fiber.rb,
lib/ramaze/snippets/string/color.rb,
lib/ramaze/reloader/watch_inotify.rb,
lib/ramaze/snippets/object/pretty.rb,
lib/ramaze/snippets/ramaze/struct.rb,
lib/ramaze/helper/request_accessor.rb,
lib/ramaze/snippets/binding/locals.rb,
lib/ramaze/snippets/object/__dir__.rb,
lib/ramaze/snippets/object/acquire.rb,
lib/ramaze/snippets/ramaze/acquire.rb,
lib/ramaze/snippets/kernel/constant.rb,
lib/ramaze/snippets/string/end_with.rb,
lib/ramaze/snippets/string/unindent.rb,
lib/ramaze/snippets/array/put_within.rb,
lib/ramaze/spec/helper/pretty_output.rb,
lib/ramaze/snippets/ramaze/deprecated.rb,
lib/ramaze/snippets/ramaze/dictionary.rb,
lib/ramaze/snippets/string/camel_case.rb,
lib/ramaze/snippets/string/snake_case.rb,
lib/ramaze/snippets/string/start_with.rb,
lib/ramaze/spec/helper/template_examples.rb,
lib/ramaze/snippets/kernel/pretty_inspect.rb,
lib/ramaze/snippets/numeric/filesize_format.rb,
lib/ramaze/snippets/object/instance_variable_defined.rb
Overview
Copyright © 2008 Michael Fellinger [email protected] All files in this distribution are subject to the terms of the Ruby license.
Defined Under Namespace
Modules: Contrib, CoreExtensions, Helper, Logger, Logging, Plugin, Spec, Tool, View Classes: App, Cache, ClassForm, Controller, Current, DefaultController, Dictionary, Dispatcher, EmailHelper, Fiber, Files, Form, GemSetup, Gestalt, InstanceForm, MiddlewareCompiler, Pager, Reloader, Request, Response, SpecLogger, Struct
Constant Summary collapse
- ROOT =
File.(File.dirname(__FILE__))
- AppMap =
An application is a collection of controllers and options that have a common name. Every application has a location it dispatches from, this behaves similar to Rack::URLMap.
Innate::URLMap.new
- Log =
Innate::Log
- VERSION =
"2009.04.08"
- OpenIDStore =
Constant for storing meta-information persistent
OpenID::Store::Filesystem.new(openid_store_file)
- DEPRECATED_CONSTANTS =
{ :BASEDIR => :ROOT, :Template => :View, :Optional => :Optioned, }
Class Attribute Summary collapse
-
.options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
-
.acquire(*globs) ⇒ Object
Require all .rb and .so files on the given globs, utilizes Dir::[].
- .const_missing(name) ⇒ Object
- .deprecated(from, to = nil) ⇒ Object
- .plugin(name, options = {}) ⇒ Object
-
.setup(options = {:verbose => true}) { ... } ⇒ Object
Convenient setup and activation of gems from different sources and specific versions.
- .to(object) ⇒ Object
Class Attribute Details
.options ⇒ Object
Returns the value of attribute options.
23 24 25 |
# File 'lib/ramaze.rb', line 23 def @options end |
Class Method Details
.acquire(*globs) ⇒ Object
Require all .rb and .so files on the given globs, utilizes Dir::[].
Examples:
# Given following directory structure:
# src/foo.rb
# src/bar.so
# src/foo.yaml
# src/foobar/baz.rb
# src/foobar/README
# requires all files in 'src':
Ramaze.acquire 'src/*'
# requires all files in 'src' recursive:
Ramaze.acquire 'src/**/*'
# require 'src/foo.rb' and 'src/bar.so' and 'src/foobar/baz.rb'
Ramaze.acquire 'src/*', 'src/foobar/*'
24 25 26 27 28 29 30 |
# File 'lib/ramaze/snippets/ramaze/acquire.rb', line 24 def self.acquire(*globs) globs.flatten.each do |glob| Dir[glob].each do |file| require file if file =~ /\.(rb|so)$/ end end end |
.const_missing(name) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/ramaze/snippets/ramaze/deprecated.rb', line 15 def self.const_missing(name) if to = DEPRECATED_CONSTANTS[name] Log.warn "Ramaze::#{name} is deprecated, use #{to} instead" constant(to) else super end end |
.deprecated(from, to = nil) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/ramaze/snippets/ramaze/deprecated.rb', line 8 def self.deprecated(from, to = nil) = "%s is deprecated" << ", use %s instead" unless to.nil? << " - from: %p" Log.warn( % [from, to, caller[1]]) end |
.plugin(name, options = {}) ⇒ Object
5 6 7 |
# File 'lib/ramaze/plugin.rb', line 5 def self.plugin(name, = {}) Plugin.load(name, ) end |
.setup(options = {:verbose => true}) { ... } ⇒ Object
Convenient setup and activation of gems from different sources and specific versions. It’s almost like Kernel#gem but also installs automatically if a gem is missing.
27 28 29 |
# File 'lib/ramaze/setup.rb', line 27 def self.setup( = {:verbose => true}, &block) GemSetup.new(, &block) end |