Class: Rails3::Engine
Defined Under Namespace
Modules: Assist
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, &block) ⇒ Engine
constructor
A new instance of Engine.
Constructor Details
#initialize(name, &block) ⇒ Engine
Returns a new instance of Engine.
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/r3_plugin_toolbox/engine.rb', line 21 def initialize name, &block @name = name module_name = name.to_s.camelize make_engine module_name engine = "#{module_name}::Engine".constantize if block block.arity < 1 ? engine.instance_eval(&block) : block.call(engine) end end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
19 20 21 |
# File 'lib/r3_plugin_toolbox/engine.rb', line 19 def name @name end |