Class: Avm::Data::Package::BasePerformer

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/data/package/base_performer.rb

Direct Known Subclasses

Clear, Dump, Load

Instance Method Summary collapse

Instance Method Details

#excludesSet<Symbol>

Returns:

  • (Set<Symbol>)


19
20
21
# File 'lib/avm/data/package/base_performer.rb', line 19

def excludes
  ::Set.new((options[OPTION_EXCLUDES] || []).map(&:to_sym))
end

#includesSet<Symbol>

Returns:

  • (Set<Symbol>)


24
25
26
# File 'lib/avm/data/package/base_performer.rb', line 24

def includes
  ::Set.new((options[OPTION_INCLUDES] || []).map(&:to_sym))
end

#selected_unitsHash<Symbol, Avm::Data::Unit]

Returns Hash<Symbol, Avm::Data::Unit].

Returns:



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