Class: European::Project

Inherits:
NamedCarryAllItem show all
Defined in:
lib/european/project.rb

Instance Attribute Summary collapse

Attributes inherited from NamedCarryAllItem

#name, #proc

Instance Method Summary collapse

Methods inherited from NamedCarryAllItem

#exec, #setup, #to_s

Constructor Details

#initialize(args) ⇒ Project

Returns a new instance of Project.



10
11
12
13
14
15
16
17
# File 'lib/european/project.rb', line 10

def initialize(args)
  @carry_all = args[:carry_all] || raise(':carry_all is required')
  @builds = {}
  @deploys = {}
  @deploy_systems = []
  @build_systems = []
  super args
end

Instance Attribute Details

#build_systemsObject

Returns the value of attribute build_systems.



6
7
8
# File 'lib/european/project.rb', line 6

def build_systems
  @build_systems
end

#buildsObject

Returns the value of attribute builds.



8
9
10
# File 'lib/european/project.rb', line 8

def builds
  @builds
end

#carry_allObject (readonly)

Returns the value of attribute carry_all.



4
5
6
# File 'lib/european/project.rb', line 4

def carry_all
  @carry_all
end

#deploy_systemsObject

Returns the value of attribute deploy_systems.



6
7
8
# File 'lib/european/project.rb', line 6

def deploy_systems
  @deploy_systems
end

#deploysObject

Returns the value of attribute deploys.



8
9
10
# File 'lib/european/project.rb', line 8

def deploys
  @deploys
end

#source_systemObject

Returns the value of attribute source_system.



6
7
8
# File 'lib/european/project.rb', line 6

def source_system
  @source_system
end

#src_urlObject

Returns the value of attribute src_url.



8
9
10
# File 'lib/european/project.rb', line 8

def src_url
  @src_url
end

Instance Method Details

#add_build(build) ⇒ Object



25
26
27
# File 'lib/european/project.rb', line 25

def add_build(build)
  builds[build.name] = build
end

#add_build_system(build_system) ⇒ Object



29
30
31
# File 'lib/european/project.rb', line 29

def add_build_system(build_system)
  build_systems << build_system
end

#add_deploy(deploy) ⇒ Object



37
38
39
# File 'lib/european/project.rb', line 37

def add_deploy(deploy)
  deploys[deploy.name] = deploy
end

#deploys_from(name) ⇒ Object



47
48
49
# File 'lib/european/project.rb', line 47

def deploys_from(name)
  carry_all.register self, :deploys_from, name
end

#has_build(name) ⇒ Object

Methods invoked by CarryAll



21
22
23
# File 'lib/european/project.rb', line 21

def has_build(name)
  carry_all.register self, :has_build, name
end

#has_deploy(name) ⇒ Object



33
34
35
# File 'lib/european/project.rb', line 33

def has_deploy(name)
  carry_all.register self, :has_deploy, name
end

#is_hosted_on(name) ⇒ Object

DSL



43
44
45
# File 'lib/european/project.rb', line 43

def is_hosted_on(name)
  carry_all.register self, :is_hosted_on, name
end