Top Level Namespace

Defined Under Namespace

Modules: Rails3

Instance Method Summary collapse

Instance Method Details

#make_engine(module_name) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/r3_plugin_toolbox/engine.rb', line 7

def make_engine module_name
  eval %{
    module #{module_name}
      class Engine < ::Rails::Engine            
        extend ::Rails3::Engine::Assist
      end
    end        
  }
end

#make_railtie(name) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/r3_plugin_toolbox/railtie.rb', line 18

def make_railtie name
  eval %{
    module #{name.to_s.camelize}
      class Railtie < Rails::Railtie
        extend ::Rails3::Plugin::Assist
      end
    end
  }
end

#rails3_engine(name, &block) ⇒ Object



9
10
11
# File 'lib/r3_plugin_toolbox/shortcuts.rb', line 9

def rails3_engine name, &block
  Rails3::Engine.new name, &block
end

#rails3_extensions(&block) ⇒ Object



1
2
3
# File 'lib/r3_plugin_toolbox/shortcuts.rb', line 1

def rails3_extensions &block
  Rails3::Plugin::Extender.new &block
end

#rails3_plugin(name, &block) ⇒ Object



5
6
7
# File 'lib/r3_plugin_toolbox/shortcuts.rb', line 5

def rails3_plugin name, &block
  Rails3::Plugin.new name, &block
end