Sha256: cc351107d474aa95591dc69b5f8ef3331d8f18b0e229fa4d70e595f7a4d2325a

Contents?: true

Size: 506 Bytes

Versions: 14

Compression:

Stored size: 506 Bytes

Contents

# frozen-string-literal: true

module Rodbot
  class CLI
    module Commands
      class New < Rodbot::CLI::Command
        desc 'Create a new Rodbot scaffold in PATH'
        argument :path, required: true, desc: 'Root directory of the new bot'
        example [
          'my_awesome_bot'
        ]

        def rescued_call(path:, **)
          Rodbot::Generator
            .new(Rodbot.env.gem.join('lib', 'templates', 'new'))
            .write(Pathname(path))
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rodbot-0.4.5 lib/rodbot/cli/commands/new.rb
rodbot-0.4.4 lib/rodbot/cli/commands/new.rb
rodbot-0.4.3 lib/rodbot/cli/commands/new.rb
rodbot-0.4.2 lib/rodbot/cli/commands/new.rb
rodbot-0.4.1 lib/rodbot/cli/commands/new.rb
rodbot-0.4.0 lib/rodbot/cli/commands/new.rb
rodbot-0.3.4 lib/rodbot/cli/commands/new.rb
rodbot-0.3.3 lib/rodbot/cli/commands/new.rb
rodbot-0.3.2 lib/rodbot/cli/commands/new.rb
rodbot-0.3.1 lib/rodbot/cli/commands/new.rb
rodbot-0.3.0 lib/rodbot/cli/commands/new.rb
rodbot-0.2.0 lib/rodbot/cli/commands/new.rb
rodbot-0.1.1 lib/rodbot/cli/commands/new.rb
rodbot-0.1.0 lib/rodbot/cli/commands/new.rb