Sha256: 218eb4c53a5a89bbf1930bd093425502ca286fb3d3991a0670f09ae52cf9575b
Contents?: true
Size: 641 Bytes
Versions: 13
Compression:
Stored size: 641 Bytes
Contents
module Ellen 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 options[:generate] ? Commands::Generate : Commands::Run end def options Slop.parse!(arguments, help: true) do on("dotenv", "Load .env before running.") on("g", "generate", "Generate a new chatterbot with ./ellen/ directory if specified.") on("l", "load=", "Load a ruby file before running.") end.to_hash end memoize :options end end
Version data entries
13 entries across 13 versions & 1 rubygems