Class: Moses::Application
- Inherits:
-
Object
- Object
- Moses::Application
- Includes:
- Moses
- Defined in:
- lib/moses/application.rb
Constant Summary
Constants included from Moses
Instance Attribute Summary collapse
-
#app_name ⇒ Object
readonly
Returns the value of attribute app_name.
-
#root_path ⇒ Object
readonly
Returns the value of attribute root_path.
Attributes included from Moses
#args, #command, #default_command, #default_option_commands, #options
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(root_path = Dir.getwd) ⇒ Application
constructor
A new instance of Application.
Methods included from Moses
#default_commands, included, #output, #run
Constructor Details
#initialize(root_path = Dir.getwd) ⇒ Application
Returns a new instance of Application.
11 12 13 |
# File 'lib/moses/application.rb', line 11 def initialize(root_path = Dir.getwd) @root_path = root_path end |
Instance Attribute Details
#app_name ⇒ Object (readonly)
Returns the value of attribute app_name.
9 10 11 |
# File 'lib/moses/application.rb', line 9 def app_name @app_name end |
#root_path ⇒ Object (readonly)
Returns the value of attribute root_path.
9 10 11 |
# File 'lib/moses/application.rb', line 9 def root_path @root_path end |
Instance Method Details
#create ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/moses/application.rb', line 15 def create if @app_name = args.first create_app_dir create_bin_dir create_lib_dir create_help_file create_version_file create_bin_file create_application_class else output.puts "You need to name your application: moses create myapp" end end |