Class: European::BuildSystem
- Inherits:
-
NamedCarryAllItem
- Object
- NamedCarryAllItem
- European::BuildSystem
- Defined in:
- lib/european/build_system.rb
Instance Attribute Summary collapse
-
#project_path ⇒ Object
readonly
Returns the value of attribute project_path.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Attributes inherited from NamedCarryAllItem
Instance Method Summary collapse
- #add_build(build) ⇒ Object
- #add_project(project) ⇒ Object
- #build(args) ⇒ Object
- #builds ⇒ Object
- #hosts_projects_at(project_path) ⇒ Object
-
#initialize(args) ⇒ BuildSystem
constructor
A new instance of BuildSystem.
- #project(args) ⇒ Object
- #projects ⇒ Object
-
#url_for_project_named(name) ⇒ Object
Methods invoked by CarryAll.
-
#url_is(url) ⇒ Object
DSL.
Methods inherited from NamedCarryAllItem
Constructor Details
#initialize(args) ⇒ BuildSystem
Returns a new instance of BuildSystem.
7 8 9 10 11 |
# File 'lib/european/build_system.rb', line 7 def initialize(args) super args @projects = {} @builds = {} end |
Instance Attribute Details
#project_path ⇒ Object (readonly)
Returns the value of attribute project_path.
5 6 7 |
# File 'lib/european/build_system.rb', line 5 def project_path @project_path end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/european/build_system.rb', line 5 def url @url end |
Instance Method Details
#add_build(build) ⇒ Object
23 24 25 |
# File 'lib/european/build_system.rb', line 23 def add_build(build) @builds[build.name] = build end |
#add_project(project) ⇒ Object
19 20 21 |
# File 'lib/european/build_system.rb', line 19 def add_project(project) @projects[project.name] = project end |
#build(args) ⇒ Object
40 41 42 43 |
# File 'lib/european/build_system.rb', line 40 def build(args) named = args[:named] || raise('named is required') @builds[named] end |
#builds ⇒ Object
36 37 38 |
# File 'lib/european/build_system.rb', line 36 def builds @builds.values end |
#hosts_projects_at(project_path) ⇒ Object
51 52 53 |
# File 'lib/european/build_system.rb', line 51 def hosts_projects_at(project_path) @project_path = project_path end |
#project(args) ⇒ Object
31 32 33 34 |
# File 'lib/european/build_system.rb', line 31 def project(args) named = args[:named] || raise('named is required') @projects[named] end |
#projects ⇒ Object
27 28 29 |
# File 'lib/european/build_system.rb', line 27 def projects() @projects.values end |
#url_for_project_named(name) ⇒ Object
Methods invoked by CarryAll
15 16 17 |
# File 'lib/european/build_system.rb', line 15 def url_for_project_named(name) eval project_path end |
#url_is(url) ⇒ Object
DSL
47 48 49 |
# File 'lib/european/build_system.rb', line 47 def url_is(url) @url = url end |