Class: Lustr::GadgetBuilder
- Inherits:
-
BuilderBase
- Object
- BuilderBase
- Lustr::GadgetBuilder
- Defined in:
- lib/lustr/gadget.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
Returns the value of attribute controller.
Attributes inherited from BuilderBase
#children, #event_handlers, #name, #options, #widget_type
Instance Method Summary collapse
- #build(parent_widget) ⇒ Object
- #build_all(eval_context, parent_widget = nil) ⇒ Object
- #dup_from(options) ⇒ Object
-
#initialize(options = {}) ⇒ GadgetBuilder
constructor
A new instance of GadgetBuilder.
Methods inherited from BuilderBase
Constructor Details
#initialize(options = {}) ⇒ GadgetBuilder
Returns a new instance of GadgetBuilder.
78 79 80 81 |
# File 'lib/lustr/gadget.rb', line 78 def initialize(={}) super(nil, ) @controller=[:controller] end |
Instance Attribute Details
#controller ⇒ Object
Returns the value of attribute controller.
76 77 78 |
# File 'lib/lustr/gadget.rb', line 76 def controller @controller end |
Instance Method Details
#build(parent_widget) ⇒ Object
98 99 100 |
# File 'lib/lustr/gadget.rb', line 98 def build() return Gadget.new(self, , controller, ) end |
#build_all(eval_context, parent_widget = nil) ⇒ Object
91 92 93 94 95 96 |
# File 'lib/lustr/gadget.rb', line 91 def build_all(eval_context, =nil) gadget=super eval_context.init_gadget gadget, self return gadget end |
#dup_from(options) ⇒ Object
83 84 85 86 87 88 89 |
# File 'lib/lustr/gadget.rb', line 83 def dup_from() myself=self.dup myself.= myself.controller=controller return myself end |