Class: Susanoo::CLI::ProjectInterface

Inherits:
Thor
  • Object
show all
Includes:
Commands::Build, Commands::Console, Commands::Generate, Commands::Run, Commands::Server, Thor::Actions
Defined in:
lib/susanoo/cli/project_interface.rb

Overview

Project wide Thor class which is responsible for each command that user execute inside project

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Commands::Generate

#get_the_generator_class, #print_generator_list

Methods included from Commands::Server

#built?, #not_built, #static_server_for

Class Method Details

.root=(path) ⇒ Object

Set the project root



17
18
19
20
# File 'lib/susanoo/cli/project_interface.rb', line 17

def self.root=(path)
  @@root = path
  Susanoo::Project.path = path
end

.source_rootObject

Set source paths for current generator



23
24
25
# File 'lib/susanoo/cli/project_interface.rb', line 23

def self.source_root
  "#{@@root}/src"
end

Instance Method Details

#project_rootObject (private)



36
37
38
# File 'lib/susanoo/cli/project_interface.rb', line 36

def project_root
  Susanoo::Project.path
end