Sha256: a1d4b9a25c7b069bbce0c46cc3cfbc82d4a3651fb9923fc0b7bb154c8ffeccd0

Contents?: true

Size: 755 Bytes

Versions: 4

Compression:

Stored size: 755 Bytes

Contents

module Steep
  module Drivers
    module Utils
      module DriverHelper
        attr_accessor :steepfile

        def load_config(path: steepfile || Pathname("Steepfile"))
          raise "Cannot find a configuration at #{path}: `steep init` to scaffold" unless path.file?

          steep_file_path = path.absolute? ? path : Pathname.pwd + path
          Project.new(base_dir: steep_file_path.parent).tap do |project|
            Project::DSL.parse(project, path.read, filename: path.to_s)
          end
        end

        def type_check(project)
          project.targets.each do |target|
            Steep.logger.tagged "target=#{target.name}" do
              target.type_check
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
steep-0.15.0 lib/steep/drivers/utils/driver_helper.rb
steep-0.14.0 lib/steep/drivers/utils/driver_helper.rb
steep-0.13.0 lib/steep/drivers/utils/driver_helper.rb
steep-0.12.0 lib/steep/drivers/utils/driver_helper.rb