Class: Gotta::Project
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Gotta::Project
- Defined in:
- lib/gotta/mod/project.rb
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#config_file_path ⇒ Object
readonly
Returns the value of attribute config_file_path.
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
Instance Method Summary collapse
-
#initialize(dir) ⇒ Project
constructor
A new instance of Project.
Constructor Details
#initialize(dir) ⇒ Project
Returns a new instance of Project.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/gotta/mod/project.rb', line 12 def initialize(dir) @dir = dir @config_file_path = "#{dir}/project.yml" @config = read_config @config["project"]["mods_dir"] ||= "mods" @config["project"]["components_dir"] ||= @config["project"]["functions_dir"] || "components" @config["project"]["public_dir"] ||= "public" check_mods_dir super(@config['project']) end |
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
8 9 10 |
# File 'lib/gotta/mod/project.rb', line 8 def config @config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
11 12 13 |
# File 'lib/gotta/mod/project.rb', line 11 def config @config end |
#config_file_path ⇒ Object (readonly)
Returns the value of attribute config_file_path.
11 12 13 |
# File 'lib/gotta/mod/project.rb', line 11 def config_file_path @config_file_path end |
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
11 12 13 |
# File 'lib/gotta/mod/project.rb', line 11 def dir @dir end |