Class: Phoenx::Workspace
- Inherits:
-
Object
- Object
- Phoenx::Workspace
- Defined in:
- lib/phoenx/entities/workspace.rb
Instance Attribute Summary collapse
-
#generated_projects ⇒ Object
readonly
Returns the value of attribute generated_projects.
-
#main_project_name ⇒ Object
readonly
Returns the value of attribute main_project_name.
-
#main_project_path ⇒ Object
readonly
Returns the value of attribute main_project_path.
-
#name ⇒ Object
Returns the value of attribute name.
-
#projects ⇒ Object
readonly
Returns the value of attribute projects.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Workspace
constructor
A new instance of Workspace.
- #main_project(name, path = nil) ⇒ Object
- #project(name, path = nil, generate = true) ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ Workspace
Returns a new instance of Workspace.
10 11 12 13 14 15 |
# File 'lib/phoenx/entities/workspace.rb', line 10 def initialize @main_project = {} @projects = {} @generated_projects = {} yield(self) end |
Instance Attribute Details
#generated_projects ⇒ Object (readonly)
Returns the value of attribute generated_projects.
8 9 10 |
# File 'lib/phoenx/entities/workspace.rb', line 8 def generated_projects @generated_projects end |
#main_project_name ⇒ Object (readonly)
Returns the value of attribute main_project_name.
5 6 7 |
# File 'lib/phoenx/entities/workspace.rb', line 5 def main_project_name @main_project_name end |
#main_project_path ⇒ Object (readonly)
Returns the value of attribute main_project_path.
6 7 8 |
# File 'lib/phoenx/entities/workspace.rb', line 6 def main_project_path @main_project_path end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/phoenx/entities/workspace.rb', line 4 def name @name end |
#projects ⇒ Object (readonly)
Returns the value of attribute projects.
7 8 9 |
# File 'lib/phoenx/entities/workspace.rb', line 7 def projects @projects end |
Instance Method Details
#main_project(name, path = nil) ⇒ Object
24 25 26 27 |
# File 'lib/phoenx/entities/workspace.rb', line 24 def main_project(name, path = nil) @main_project_name = name @main_project_path = path end |
#project(name, path = nil, generate = true) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/phoenx/entities/workspace.rb', line 17 def project(name, path = nil, generate = true) @projects[name] = path if generate @generated_projects[name] = path end end |