Class: Gloo::Objs::Container
- Inherits:
-
Core::Obj
- Object
- Core::Baseo
- Core::Obj
- Gloo::Objs::Container
- Defined in:
- lib/gloo/objs/basic/container.rb
Constant Summary collapse
- KEYWORD =
'container'.freeze
- KEYWORD_SHORT =
'can'.freeze
Constants inherited from Core::Baseo
Core::Baseo::NOT_IMPLEMENTED_ERR
Instance Attribute Summary
Attributes inherited from Core::Obj
Attributes inherited from Core::Baseo
Class Method Summary collapse
-
.messages ⇒ Object
Get a list of message names that this object receives.
-
.short_typename ⇒ Object
The short name of the object type.
-
.typename ⇒ Object
The name of the object type.
Instance Method Summary collapse
-
#msg_count ⇒ Object
Count the number of children in the container.
-
#msg_delete_children ⇒ Object
Delete all children in the container.
-
#msg_show_key_value_table ⇒ Object
Show the given table data.
Methods inherited from Core::Obj
#add_child, #add_children_on_create?, #add_default_children, can_create?, #can_receive_message?, #child_count, #contains_child?, #delete_children, #dispatch, #display_value, #find_add_child, #find_child, help, inherited, #initialize, #msg_reload, #msg_unload, #multiline_value?, #pn, #remove_child, #root?, #send_message, #set_parent, #set_value, #type_display, #value_display, #value_is_array?, #value_is_blank?, #value_string?
Methods inherited from Core::Baseo
Constructor Details
This class inherits a constructor from Gloo::Core::Obj
Class Method Details
.messages ⇒ Object
Get a list of message names that this object receives.
35 36 37 |
# File 'lib/gloo/objs/basic/container.rb', line 35 def self. return super + %w[count delete_children show_key_value_table] end |
.short_typename ⇒ Object
The short name of the object type.
24 25 26 |
# File 'lib/gloo/objs/basic/container.rb', line 24 def self.short_typename return KEYWORD_SHORT end |
.typename ⇒ Object
The name of the object type.
17 18 19 |
# File 'lib/gloo/objs/basic/container.rb', line 17 def self.typename return KEYWORD end |
Instance Method Details
#msg_count ⇒ Object
Count the number of children in the container.
42 43 44 45 46 |
# File 'lib/gloo/objs/basic/container.rb', line 42 def msg_count i = child_count @engine.heap.it.set_to i return i end |
#msg_delete_children ⇒ Object
Delete all children in the container.
51 52 53 |
# File 'lib/gloo/objs/basic/container.rb', line 51 def msg_delete_children self.delete_children end |
#msg_show_key_value_table ⇒ Object
Show the given table data.
58 59 60 61 |
# File 'lib/gloo/objs/basic/container.rb', line 58 def msg_show_key_value_table data = self.children.map { |o| [ o.name, o.value ] } @engine.platform.show_table nil, data, title end |