Sha256: 3e6fbb4d4521059b53defbefa045da8a3bfb80f0e77158a26e0fb6002415d558

Contents?: true

Size: 448 Bytes

Versions: 1

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true

module Massa
  class Tool
    class << self
      def list
        YAML.load_file(tools_yaml_file).map { |tool| OpenStruct.new(tool) }
      end

      def tools_yaml_file
        "#{Gem::Specification.find_by_name('massa').gem_dir}/config/default_tools.yml"
      rescue Gem::LoadError
        Massa::CLI.colorize :red, "¯\\_(ツ)_/¯ 'massa' gem is not in your Gemfile."
        exit 1
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
massa-0.0.8 lib/massa/tool.rb