Sha256: d2ade45142be0329dd9ec53f12a8fe32b9131ccd06da6b7ce2a89e1bcddd47ea

Contents?: true

Size: 420 Bytes

Versions: 3

Compression:

Stored size: 420 Bytes

Contents

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}/lib/massa/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

3 entries across 3 versions & 1 rubygems

Version Path
massa-0.0.4 lib/massa/tool.rb
massa-0.0.3 lib/massa/tool.rb
massa-0.0.2 lib/massa/tool.rb