Sha256: 42fae1d89e578f4a04b523778d9290e8b8012be8f1423375d4b269d4247a62bf

Contents?: true

Size: 364 Bytes

Versions: 5

Compression:

Stored size: 364 Bytes

Contents

require "gorails"

module Gorails
  module Commands
    class Example < Gorails::Command
      def call(_args, _name)
        puts "neato"

        if rand < 0.05
          raise(CLI::Kit::Abort, "you got unlucky!")
        end
      end

      def self.help
        "A dummy command.\nUsage: {{command:#{Gorails::TOOL_NAME} example}}"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gorails-0.1.5 lib/gorails/commands/example.rb
gorails-0.1.4 lib/gorails/commands/example.rb
gorails-0.1.3 lib/gorails/commands/example.rb
gorails-0.1.2 lib/gorails/commands/example.rb
gorails-0.1.1 lib/gorails/commands/example.rb