Class: Phoenx::Workspace

Inherits:
Object
  • Object
show all
Defined in:
lib/phoenx/entities/workspace.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Workspace

Returns a new instance of Workspace.

Yields:

  • (_self)

Yield Parameters:



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_projectsObject (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_nameObject (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_pathObject (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

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/phoenx/entities/workspace.rb', line 4

def name
  @name
end

#projectsObject (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