Class: Apotomo::WidgetShortcuts::FactoryProxy
- Inherits:
-
Object
- Object
- Apotomo::WidgetShortcuts::FactoryProxy
- Defined in:
- lib/apotomo/widget_shortcuts.rb
Instance Method Summary collapse
- #build(parent) ⇒ Object
-
#initialize(prefix, *args, &block) ⇒ FactoryProxy
constructor
A new instance of FactoryProxy.
Constructor Details
#initialize(prefix, *args, &block) ⇒ FactoryProxy
Returns a new instance of FactoryProxy.
36 37 38 39 40 41 |
# File 'lib/apotomo/widget_shortcuts.rb', line 36 def initialize(prefix, *args, &block) = args. id = args.shift || prefix @prefix, @id, , @block = prefix, id, , block end |
Instance Method Details
#build(parent) ⇒ Object
43 44 45 46 47 |
# File 'lib/apotomo/widget_shortcuts.rb', line 43 def build(parent) = constant_for(@prefix).new(parent, @id, ) @block.call() if @block end |