Class: Rails3::Plugin
- Inherits:
-
Object
- Object
- Rails3::Plugin
- Defined in:
- lib/r3_plugin_toolbox/macro.rb,
lib/r3_plugin_toolbox/railtie.rb,
lib/r3_plugin_toolbox/extender.rb,
lib/r3_plugin_toolbox/extender/util.rb,
lib/r3_plugin_toolbox/extender/load_handler.rb,
lib/r3_plugin_toolbox/rspec/matchers/be_extended_with.rb
Direct Known Subclasses
Defined Under Namespace
Modules: Assist Classes: Extender
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, &block) ⇒ Plugin
constructor
A new instance of Plugin.
Constructor Details
#initialize(name, &block) ⇒ Plugin
Returns a new instance of Plugin.
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/r3_plugin_toolbox/railtie.rb', line 32 def initialize name, &block @name = name module_name = name.to_s.camelize make_railtie module_name railtie = "#{module_name}::Railtie".constantize if block block.arity < 1 ? railtie.instance_eval(&block) : block.call(railtie) end end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
30 31 32 |
# File 'lib/r3_plugin_toolbox/railtie.rb', line 30 def name @name end |