Sha256: 4a2ee070f34f33474a6bc8b7f6e156d53469de67de91e1ca96ab9b6b06fbe48b

Contents?: true

Size: 547 Bytes

Versions: 2

Compression:

Stored size: 547 Bytes

Contents

# frozen_string_literal: true

module Massa
  class Tool
    class << self
      def list
        default_tools = YAML.load_file(config_file_from_gem)

        if File.exist?(config_file_from_project)
          default_tools.merge YAML.load_file(config_file_from_project)
        else
          default_tools
        end
      end

      def config_file_from_gem
        File.expand_path('../../../config/default_tools.yml', __FILE__)
      end

      def config_file_from_project
        "#{Dir.pwd}/config/massa.yml"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
massa-0.1.2 lib/massa/tool.rb
massa-0.1.1 lib/massa/tool.rb