In Files

Class Index [+]

Quicksearch

Ramaze

Namespace for Ramaze

THINK:

  * for now, we don't extend this with Innate to keep things clean. But we
    should eventually do it for a simple API, or people always have to find
    out whether something is in Innate or Ramaze.
    No matter which way we go, we should keep references point to the
    original location to avoid too much confusion for core developers.

         Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


:nodoc:


         Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


Dictionary

The Dictionary class is a Hash that preserves order. So it has some array-like extensions also. By defualt a Dictionary object preserves insertion order, but any order can be specified including alphabetical key order.

Usage

Just require this file and use Dictionary instead of Hash.

  # You can do simply
  hsh = Dictionary.new
  hsh['z'] = 1
  hsh['a'] = 2
  hsh['c'] = 3
  p hsh.keys     #=> ['z','a','c']

  # or using Dictionary[] method
  hsh = Dictionary['z', 1, 'a', 2, 'c', 3]
  p hsh.keys     #=> ['z','a','c']

  # but this don't preserve order
  hsh = Dictionary['z'=>1, 'a'=>2, 'c'=>3]
  p hsh.keys     #=> ['a','c','z']

  # Dictionary has useful extensions: push, pop and unshift
  p hsh.push('to_end', 15)       #=> true, key added
  p hsh.push('to_end', 30)       #=> false, already - nothing happen
  p hsh.unshift('to_begin', 50)  #=> true, key added
  p hsh.unshift('to_begin', 60)  #=> false, already - nothing happen
  p hsh.keys                     #=> ["to_begin", "a", "c", "z", "to_end"]
  p hsh.pop                      #=> ["to_end", 15], if nothing remains, return nil
  p hsh.keys                     #=> ["to_begin", "a", "c", "z"]
  p hsh.shift                    #=> ["to_begin", 30], if nothing remains, return nil

Usage Notes


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.


         Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com

All files in this distribution are subject to the terms of the MIT license.

Constants

ROOT
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.

Cache
UNSUPPORTED_GEMS

Array containing gems that aren’t supported for certain reasons. The gems that are in this array by default will be removed if the current setup does support them.

DEPENDENCIES

Array containing the names and versions of all the gems required by Ramaze along with the name of how the gem should be required.

DEVELOPMENT_DEPENDENCIES

Array containing all the development dependencies.

Helper
OpenIDStore

Constant for storing meta-information persistent

Log
DEPRECATED_CONSTANTS
VERSION
View

Attributes

options[RW]

Public Class Methods

acquire(*globs) click to toggle source

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/*'
    # File lib/ramaze/snippets/ramaze/acquire.rb, line 25
25:   def self.acquire(*globs)
26:     globs.flatten.each do |glob|
27:       Dir[glob].each do |file|
28:         require file if file =~ /\.(rb|so)$/
29:       end
30:     end
31:   end
const_missing(name) click to toggle source
    # File lib/ramaze/snippets/ramaze/deprecated.rb, line 15
15:   def self.const_missing(name)
16:     if to = DEPRECATED_CONSTANTS[name]
17:       Log.warn "Ramaze::#{name} is deprecated, use #{to} instead"
18:       constant(to)
19:     else
20:       super
21:     end
22:   end
deprecated(from, to = nil) click to toggle source
    # File lib/ramaze/snippets/ramaze/deprecated.rb, line 8
 8:   def self.deprecated(from, to = nil)
 9:     message = "%s is deprecated"
10:     message << ", use %s instead" unless to.nil?
11:     message << " - from: %p"
12:     Log.warn(message % [from, to, caller[1]])
13:   end
plugin(name, options = {}) click to toggle source
   # File lib/ramaze/plugin.rb, line 5
5:   def self.plugin(name, options = {})
6:     Plugin.load(name, options)
7:   end
setup(options = {:verbose => true}, &block) click to toggle source

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.

@example

 Ramaze.setup :verbose => true do
   # gem and specific version
   gem 'makura', '>=2009.01'

   # gem and name for require
   gem 'aws-s3', :lib => 'aws/s3'

   # gem with specific version from rubyforge (default)
   gem 'json', :version => '=1.1.3', :source => rubyforge
 end

@author manveru @since 19-05-2009 @see GemSetup#initialize

    # File lib/ramaze/setup.rb, line 23
23:   def self.setup(options = {:verbose => true}, &block)
24:     GemSetup.new(options, &block)
25:   end
to(object) click to toggle source

:nodoc:

    # File lib/ramaze/app.rb, line 8
 8:   def self.to(object)
 9:     app_name = object.ancestral_trait[:app]
10:     App[app_name].to(object)
11:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.