Module: Avm::Launcher::Instances::RunnerHelper
- Defined in:
- lib/avm/launcher/instances/runner_helper.rb
Instance Method Summary collapse
- #context ⇒ Object
- #instance_label(instance) ⇒ Object
- #instance_stereotypes(instance) ⇒ Object
- #instances ⇒ Object
- #setup_cache ⇒ Object
Instance Method Details
#context ⇒ Object
21 22 23 |
# File 'lib/avm/launcher/instances/runner_helper.rb', line 21 def context @context ||= ::Avm::Launcher::Context.current end |
#instance_label(instance) ⇒ Object
37 38 39 |
# File 'lib/avm/launcher/instances/runner_helper.rb', line 37 def instance_label(instance) "#{instance.name} [#{instance_stereotypes(instance)}]" end |
#instance_stereotypes(instance) ⇒ Object
33 34 35 |
# File 'lib/avm/launcher/instances/runner_helper.rb', line 33 def instance_stereotypes(instance) instance.stereotypes.map(&:label).join(', ') end |
#instances ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/avm/launcher/instances/runner_helper.rb', line 25 def instances collector = ::Avm::Launcher::Context::InstanceCollector.new(context) collector.add_all if parsed.all? collector.add_pending if parsed.pending? parsed.instance_path.flat_map { |p| collector.add_path(p) } collector.instances end |