Sha256: 1ec6b4489fd7b374f25692e1f08c95caaf048072b1b27f04b4eef2e751c7d68a
Contents?: true
Size: 995 Bytes
Versions: 2
Compression:
Stored size: 995 Bytes
Contents
# frozen_string_literal: true require 'avm/core_ext' module Avm module Launcher module Instances class RunnerHelper def context @context ||= ::EacLauncher::Context.current end def find_instances(instance_name) context.instances.select { |instance| instance_match?(instance, instance_name) } end def instance_match?(instance, instance_name) ::File.fnmatch?(instance_name, instance.name) end def instances if parsed.all? context.instances elsif parsed.pending? context.pending_instances else parsed.instance_path.flat_map { |p| find_instances(p) } end end def instance_stereotypes(instance) instance.stereotypes.map(&:label).join(', ') end def instance_label(instance) "#{instance.name} [#{instance_stereotypes(instance)}]" end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
avm-tools-0.99.0 | lib/avm/launcher/instances/runner_helper.rb |
avm-tools-0.98.0 | lib/avm/launcher/instances/runner_helper.rb |