lib/jss/api_object/scopable/scope.rb
def scoped_machines
        scoped_machines = {}
        @target_class.all_objects(api: container.api).each do |machine|
          scoped_machines[machine.id] = machine.name if in_scope? machine
        end
        scoped_machines
      end
# Return a hash of id => name for all machines in the target class
# that are within this scope.
#
# WARNING: This must instantiate all machines in the target class.
# It will still be slow, at least the first time for each target class.
# On the upside, the instantiated machines will be cached, so generating
# this list for other scopes with the same target class will be much
# much faster.
# In tests, 1600 Computers took about 7 minutes the first time,
# but less than 1 second after caching.
#
# See also the warning for #in_scope?
#
# @return [Hash{Integer => String}]
#
################
Return a hash of id => name for all machines in the target class
that are within this scope.

This must instantiate all machines in the target class.
It will still be slow, at least the first time for each target class.
On the upside, the instantiated machines will be cached, so generating
this list for other scopes with the same target class will be much
much faster.
In tests, 1600 Computers took about 7 minutes the first time,
but less than 1 second after caching.


Return a hash of id = > name for all machines in the target class that are within this scope . This must instantiate all machines in the target class . It will still be slow at least the first time for each target class . On the upside the instantiated machines will be cached so generating this list for other scopes with the same target class will be much much faster . In tests 1600 Computers took about 7 minutes the first time but less than 1 second after caching .
def scoped_machines
        scoped_machines = {}
        @target_class.all_objects(api: container.api).each do |machine|
          scoped_machines[machine.id] = machine.name if in_scope? machine
        end
        scoped_machines
      end
def scoped_machines scoped_machines = { } @target_class . all_objects ( api : container . api ) . each do | machine | scoped_machines [ machine . id ] = machine . name if in_scope? machine end scoped_machines end
Return a hash of id => name for all machines in the target class
that are within this scope.
Return a hash of id = > name for all machines in the target class that are within this scope .
None
Hash{Integer => String}