Sha256: adc549b6f26f6ae1e5d935172f307437daa63c1f039ca32a71eff6f24bf4844d

Contents?: true

Size: 542 Bytes

Versions: 2

Compression:

Stored size: 542 Bytes

Contents

# frozen_string_literal: true

require 'thor/group'

module SmartnessDetector
  module Generators
    class Install < Thor::Group
      argument :group, type: :string
      argument :name, type: :string
      include Thor::Actions

      def self.source_root
        "#{File.dirname(__FILE__)}/smartness"
      end

      def self.exit_on_failure?
        true
      end

      def create_group
        empty_directory(group)
      end

      def smartness
        template('smartness.txt', "#{group}/#{name}.txt")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
smartness_detector-1.0.0 lib/smartness_detector/generators/install.rb
smartness_detector-0.1.2 lib/smartness_detector/generators/install.rb