rakelib/45-kitchen.rake
# Gets a collection of instances.
#
# @param regexp [String] regular expression to match against instance names.
# @param config [Hash] configuration values for the `Kitchen::Config` class.
# @return [Collection<Instance>] all instances.
Gets a collection of instances.
Gets a collection of instances .
def kitchen_instances(regexp, config)
    instances = Kitchen::Config.new(config).instances
    instances = instances.get_all(Regexp.new(regexp)) unless regexp.nil? || regexp == 'all'
    raise Kitchen::UserError, "regexp '#{regexp}' matched 0 instances" if instances.empty?
    instances
  end
def kitchen_instances ( regexp , config ) instances = Kitchen :: Config . new ( config ) . instances instances = instances . get_all ( Regexp . new ( regexp ) ) unless regexp . nil? || regexp == 'all' raise Kitchen :: UserError , "regexp '#{regexp}' matched 0 instances" if instances . empty? instances end
Gets a collection of instances.
Gets a collection of instances .
None
Collection<Instance>
regexp
regular expression to match against instance names.
regular expression to match against instance names .
config
configuration values for the `Kitchen::Config` class.
configuration values for the ` Kitchen :: Config ` class .