Class: Avm::Data::Package::BasePerformer
- Inherits:
-
Object
- Object
- Avm::Data::Package::BasePerformer
- Defined in:
- lib/avm/data/package/base_performer.rb
Instance Method Summary collapse
- #excludes ⇒ Set<Symbol>
- #includes ⇒ Set<Symbol>
-
#selected_units ⇒ Hash<Symbol, Avm::Data::Unit]
Hash<Symbol, Avm::Data::Unit].
Instance Method Details
#excludes ⇒ Set<Symbol>
19 20 21 |
# File 'lib/avm/data/package/base_performer.rb', line 19 def excludes ::Set.new(([OPTION_EXCLUDES] || []).map(&:to_sym)) end |
#includes ⇒ Set<Symbol>
24 25 26 |
# File 'lib/avm/data/package/base_performer.rb', line 24 def includes ::Set.new(([OPTION_INCLUDES] || []).map(&:to_sym)) end |
#selected_units ⇒ Hash<Symbol, Avm::Data::Unit]
Returns Hash<Symbol, Avm::Data::Unit].
29 30 31 32 33 34 |
# File 'lib/avm/data/package/base_performer.rb', line 29 def selected_units r = package.units r = r.slice(*includes.to_a) if includes.any? r = r.except(*excludes.to_a) if excludes.any? r end |