Class: Windoo::CapabilityManager
- Inherits:
-
BaseClasses::CriteriaManager
- Object
- BaseClasses::ArrayManager
- BaseClasses::CriteriaManager
- Windoo::CapabilityManager
- Defined in:
- lib/windoo/objects/capability_manager.rb
Overview
A CriteriaManager for dealing with the Capabilities of a Patch
An instance of this is returned by Patch#capabilities
Constant Summary collapse
- MEMBER_CLASS =
Constants
Windoo::Capability
Constants inherited from BaseClasses::ArrayManager
BaseClasses::ArrayManager::PP_OMITTED_INST_VARS
Instance Attribute Summary
Attributes inherited from BaseClasses::ArrayManager
Instance Method Summary collapse
-
#delete_all_criteria ⇒ void
Delete all the criteria.
-
#delete_criterion(id) ⇒ Object
Override this method to disable the containing patch if there are no more capabilities.
Methods inherited from BaseClasses::CriteriaManager
#add_criterion, available_names, available_types, #move_criterion, operators_for, #replace_criterion
Methods inherited from BaseClasses::ArrayManager
#[], #each, #empty?, #find, #find_by_attr, #first, #index, #initialize, #last, #pretty_print_instance_variables, #size, #to_a
Constructor Details
This class inherits a constructor from Windoo::BaseClasses::ArrayManager
Instance Method Details
#delete_all_criteria ⇒ void
This method returns an undefined value.
Delete all the criteria
43 44 45 46 47 48 |
# File 'lib/windoo/objects/capability_manager.rb', line 43 def delete_all_criteria super # patches without a capabliity are not valid # so must be disabled @container.disable end |
#delete_criterion(id) ⇒ Object
Override this method to disable the containing patch if there are no more capabilities.
29 30 31 32 33 34 35 36 37 |
# File 'lib/windoo/objects/capability_manager.rb', line 29 def delete_criterion(id) deleted_id = super # patches without a capabliity are not valid # so must be disabled @container.disable if @managed_array.empty? deleted_id end |