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.6.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.5.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.4.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.3.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_tools-0.2.2 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_cli-0.27.6 lib/eac_cli/runner/after_class_methods.rb
avm-tools-0.120.2 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
avm-tools-0.120.1 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
avm-tools-0.120.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
avm-tools-0.119.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
avm-tools-0.118.0 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
avm-tools-0.117.3 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_cli-0.27.5 lib/eac_cli/runner/after_class_methods.rb
avm-tools-0.117.2 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
eac_cli-0.27.4 lib/eac_cli/runner/after_class_methods.rb
avm-tools-0.117.1 sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb