Class: CWM::WrapperWidget
- Inherits:
-
AbstractWidget
- Object
- AbstractWidget
- CWM::WrapperWidget
- Defined in:
- library/cwm/src/lib/cwm/wrapper_widget.rb
Overview
Note:
it does not support some of common methods and helpers from abstract widget
Wrapper when combination of old hash based CWM definition needed to be used with new object based one. Useful e.g. when content is provided by other module like CWMFirewallInterfaces.CreateOpenFirewallWidget
Instance Attribute Summary
Attributes inherited from AbstractWidget
Class Method Summary collapse
-
.widget_type=(_arg) ⇒ Object
not supported.
Instance Method Summary collapse
-
#cwm_definition ⇒ Object
returns given hash specification.
- #handle_all_events ⇒ Object
-
#handle_all_events=(_arg) ⇒ Object
not supported.
-
#initialize(content, id: nil) ⇒ WrapperWidget
constructor
Creates new instance with specified id and content.
Methods inherited from AbstractWidget
#cleanup, #disable, #displayed?, #enable, #enabled?, #focus, #fun_ref, #handle, #help, #init, #label, #my_event?, #opt, #refresh_help, #store, #validate
Constructor Details
#initialize(content, id: nil) ⇒ WrapperWidget
Creates new instance with specified id and content
21 22 23 24 25 26 |
# File 'library/cwm/src/lib/cwm/wrapper_widget.rb', line 21 def initialize(content, id: nil) super() self. = id if id @content = content end |
Class Method Details
.widget_type=(_arg) ⇒ Object
not supported
45 46 47 |
# File 'library/cwm/src/lib/cwm/wrapper_widget.rb', line 45 def self.(_arg) raise "Not supported for WrapperWidget" end |
Instance Method Details
#cwm_definition ⇒ Object
returns given hash specification
29 30 31 |
# File 'library/cwm/src/lib/cwm/wrapper_widget.rb', line 29 def cwm_definition @content.merge("_cwm_key" => ) end |
#handle_all_events ⇒ Object
33 34 35 |
# File 'library/cwm/src/lib/cwm/wrapper_widget.rb', line 33 def handle_all_events @content["handle_events"].nil? end |
#handle_all_events=(_arg) ⇒ Object
not supported
39 40 41 |
# File 'library/cwm/src/lib/cwm/wrapper_widget.rb', line 39 def handle_all_events=(_arg) raise "Not supported for WrapperWidget" end |