Module: Rails3::Plugin::Assist

Included in:
Engine::Assist
Defined in:
lib/r3_plugin_toolbox/railtie.rb

Instance Method Summary collapse

Instance Method Details

#configs(&block) ⇒ Object



46
47
48
49
50
# File 'lib/r3_plugin_toolbox/railtie.rb', line 46

def configs &block
  if block
    config.instance_eval(&block)
  end      
end

#set_orm(orm_name) ⇒ Object



60
61
62
# File 'lib/r3_plugin_toolbox/railtie.rb', line 60

def set_orm orm_name
  config.generators.orm(orm_name)
end

#set_test_framework(name) ⇒ Object



52
53
54
# File 'lib/r3_plugin_toolbox/railtie.rb', line 52

def set_test_framework name
  config.generators.test_framework name
end

#subscribe_notifications(*args, &block) ⇒ Object



64
65
66
67
68
# File 'lib/r3_plugin_toolbox/railtie.rb', line 64

def subscribe_notifications *args, &block
  ActiveSupport::Notifications.subscribe do |*args|
    yield *args
  end
end

#use_middleware(middleware) ⇒ Object



56
57
58
# File 'lib/r3_plugin_toolbox/railtie.rb', line 56

def use_middleware middleware
  app.middleware.use middleware
end