Class: Gocart::Base
- Inherits:
-
Object
- Object
- Gocart::Base
- Defined in:
- lib/gocart/base.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#app_name_valid? ⇒ Boolean
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/gocart/base.rb', line 8 def app_name_valid? unless File.stat(@app_parent_path).readable? @logger.fatal("App parent directory is not readable") return false end unless File.stat(@app_parent_path).writable? @logger.fatal("App parent directory is not writable") return false end if Dir.exist?(@app_base_path) @logger.fatal("App #{@app_name} directory already exists") return false end return true end |
#build_app_dir ⇒ Object
24 25 26 |
# File 'lib/gocart/base.rb', line 24 def build_app_dir FileUtils::cp_r @assets_path, @app_base_path end |