Sha256: f2d557ed1b6c0005eba74e547e2d106c261a8f0663aaa775506bd11b8c99c706

Contents?: true

Size: 679 Bytes

Versions: 10

Compression:

Stored size: 679 Bytes

Contents

# frozen_string_literal: true

module AnnotateRb
  class Runner
    class << self
      def run(args)
        new.run(args)
      end
    end

    def run(args)
      config_file_options = ConfigLoader.load_config
      parser = Parser.new(args, {})

      parsed_options = parser.parse
      remaining_args = parser.remaining_args

      options = config_file_options.merge(parsed_options)

      @options = Options.from(options, {working_args: remaining_args})
      AnnotateRb::RakeBootstrapper.call(@options)

      if @options[:command]
        @options[:command].call(@options)
      else
        # TODO
        raise "Didn't specify a command"
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
annotaterb-4.13.0 lib/annotate_rb/runner.rb
annotaterb-4.12.0 lib/annotate_rb/runner.rb
annotaterb-4.11.0 lib/annotate_rb/runner.rb
annotaterb-4.10.2 lib/annotate_rb/runner.rb
annotaterb-4.10.1 lib/annotate_rb/runner.rb
annotaterb-4.10.0 lib/annotate_rb/runner.rb
annotaterb-4.9.0 lib/annotate_rb/runner.rb
annotaterb-4.7.0 lib/annotate_rb/runner.rb
annotaterb-4.6.0 lib/annotate_rb/runner.rb
annotaterb-4.5.0 lib/annotate_rb/runner.rb