Class: Sc2::UnitGroup::UnitGroupNotSelector
- Inherits:
-
Sc2::UnitGroup
- Object
- Sc2::UnitGroup
- Sc2::UnitGroup::UnitGroupNotSelector
- Defined in:
- lib/sc2ai/unit_group/filter_ext.rb
Overview
Negative selector allowing unit group “ug.not.” filter
Constant Summary
Constants inherited from Sc2::UnitGroup
TYPE_BASES, TYPE_GAS_STRUCTURE, TYPE_GEYSER, TYPE_MINERAL, TYPE_REACTOR, TYPE_REJECT_DEBRIS, TYPE_TECHLAB, TYPE_WORKER
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
Attributes inherited from Sc2::UnitGroup
Instance Method Summary collapse
- #initialize(unit_group) ⇒ UnitGroupNotSelector constructor
-
#reject ⇒ Object
Does the opposite of selector and returns those values for parent.
-
#select ⇒ Object
Does the opposite of selector and returns those values for parent.
Methods inherited from Sc2::UnitGroup
#:@units, #[]=, #ability_available?, #action, #add, #army, #at, #attack, #bases, #bot, #build, #clear, #completed, #contains?, #creep_tumors, #creep_tumors_burrowed, #debris, #delete_if, #detect, #each, #each_with_tag, #eggs, #empty?, #eql?, #except, #filter!, #first, #gas, #geysers, #hold, #idle, #incomplete, #intersection, #is_performing_ability?, #kdtree, #keep_if, #keys, #larva, #last, #length, #merge, #merge!, #minerals, #move, #nearest_to, #non_army_unit_type_ids, #not, #overlords, #overseers, #owned, #pos_centroid, #pylons, #queens, #reject!, #reject_attribute, #reject_type, #remove, #repair, #replace, #research, #sample, #select!, #select_attribute, #select_in_circle, #select_type, #shift, #size, #slice, #smart, #stop, #structures, #subtract, #tags, #to_a, #to_h, #to_hash, #to_proc, #values, #values_at, #warp, #warpables, #warpgates, #watchtowers, #workers
Constructor Details
#initialize(unit_group) ⇒ UnitGroupNotSelector
132 133 134 135 |
# File 'lib/sc2ai/unit_group/filter_ext.rb', line 132 def initialize(unit_group) @parent = unit_group super end |
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
128 129 130 |
# File 'lib/sc2ai/unit_group/filter_ext.rb', line 128 def parent @parent end |
Instance Method Details
#reject ⇒ Object
Does the opposite of selector and returns those values for parent
145 146 147 |
# File 'lib/sc2ai/unit_group/filter_ext.rb', line 145 def reject(...) @parent.select(...) end |
#select ⇒ Object
Does the opposite of selector and returns those values for parent
139 140 141 |
# File 'lib/sc2ai/unit_group/filter_ext.rb', line 139 def select(...) @parent.reject(...) end |