Class: CreateProj::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/createproj/cli.rb

Overview

Base class for CLI. Provides three project creation methods dependent on language type.

Instance Method Summary collapse

Instance Method Details

#haskell(name) ⇒ Object

Command line input option for creating haskell project.

Examples:

Call from command line

$ ./createproj haskell newproj #=> creates haskell proj called new proj

Parameters:

  • name (String)

    the project

Returns:

  • Nothing



17
18
19
# File 'lib/createproj/cli.rb', line 17

def haskell(name)
  CreateProj::Creator::HaskellCreator.new(name, options).run
end

#python(name) ⇒ Object

Command line input option for creating python project.

Examples:

Call from command line

$ ./createproj python newproj #=> creates python proj called newproj

Parameters:

  • name (String)

    the project

Returns:

  • Nothing



30
31
32
# File 'lib/createproj/cli.rb', line 30

def python(name)
  CreateProj::Creator::PythonCreator.new(name, options).run
end

#rails(name) ⇒ Object

Command line input option for creating rails project.

Examples:

Call from command line

$ ./createproj haskell newproj #=> creates rails proj called new proj

Parameters:

  • name (String)

    the project

Returns:

  • Nothing



46
47
48
# File 'lib/createproj/cli.rb', line 46

def rails(name)
  CreateProj::Creator::RailsCreator.new(name, options).run
end

#ruby(name) ⇒ Object

Command line input option for creating ruby project.

Examples:

Call from command line

$ ./createproj ruby newproj #=> creates ruby proj called new proj

Parameters:

  • name (String)

    the project

Returns:

  • Nothing



59
60
61
# File 'lib/createproj/cli.rb', line 59

def ruby(name)
  CreateProj::Creator::RubyCreator.new(name, options).run
end