Sha256: 54d9644e6d36b461158058df64da13f4a504f439a2939fca6bcc0ea88fb65950

Contents?: true

Size: 858 Bytes

Versions: 116

Compression:

Stored size: 858 Bytes

Contents

# frozen_string_literal: true

require 'eac_cli/definition'
require 'eac_cli/runner/class_runner'

module EacCli
  module Runner
    module AfterClassMethods
      # @return [EacCli::Runner::ClassRunner]
      def class_runner(runner_context_args)
        ::EacCli::Runner::ClassRunner.new(self, runner_context_args)
      end

      def create(*runner_context_args)
        class_runner(runner_context_args).create
      end

      def run(*runner_context_args)
        class_runner(runner_context_args).run
      end

      def runner_definition(&block)
        @runner_definition ||= super_runner_definition
        @runner_definition.instance_eval(&block) if block
        @runner_definition
      end

      def super_runner_definition
        superclass.try(:runner_definition).if_present(&:dup) || ::EacCli::Definition.new
      end
    end
  end
end

Version data entries

116 entries across 116 versions & 3 rubygems

Version Path
eac_tools-0.57.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.56.1 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.56.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.55.7 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.55.6 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.55.5 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.55.4 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.55.3 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.55.2 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_cli-0.30.1 lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.55.1 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.55.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.54.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.53.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.52.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.51.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.50.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.49.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.48.1 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.48.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb