Sha256: 1802b4adc2e22d77f73107d75663df6667c89dbf965824c611eac8ed8157b562
Contents?: true
Size: 827 Bytes
Versions: 1
Compression:
Stored size: 827 Bytes
Contents
module Ruboty class CommandBuilder include Mem attr_reader :arguments def initialize(arguments = ARGV) @arguments = arguments end def build command_class.new(options) end private def command_class case when options[:generate] Commands::Generate when options[:help] Commands::Help else Commands::Run end end def options Slop.parse(arguments) do |options| options.on("--dotenv", "Load .env before running.") options.on("-g", "--generate", "Generate a new chatterbot with ./ruboty/ directory if specified.") options.on("-h", "--help", "Display this help message.") options.on("-l", "--load=", "Load a ruby file before running.") end end memoize :options end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruboty-1.1.4 | lib/ruboty/command_builder.rb |