Class: Vx::Builder::BuildConfiguration::Deploy
- Inherits:
-
Object
- Object
- Vx::Builder::BuildConfiguration::Deploy
- Defined in:
- lib/vx/builder/build_configuration/deploy.rb,
lib/vx/builder/build_configuration/deploy/base.rb,
lib/vx/builder/build_configuration/deploy/shell.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
- #empty? ⇒ Boolean
- #find_modules(branch) ⇒ Object
-
#initialize(new_env) ⇒ Deploy
constructor
A new instance of Deploy.
Constructor Details
#initialize(new_env) ⇒ Deploy
Returns a new instance of Deploy.
20 21 22 |
# File 'lib/vx/builder/build_configuration/deploy.rb', line 20 def initialize(new_env) normalize(new_env) end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
18 19 20 |
# File 'lib/vx/builder/build_configuration/deploy.rb', line 18 def attributes @attributes end |
Class Method Details
.restore_modules(values) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/vx/builder/build_configuration/deploy.rb', line 7 def restore_modules(values) (values || []).inject([]) do |ac, pair| k = pair.keys.first if it = Base.module_by_key(k) ac << it.new(pair) end ac end end |
Instance Method Details
#empty? ⇒ Boolean
28 29 30 |
# File 'lib/vx/builder/build_configuration/deploy.rb', line 28 def empty? attributes.empty? end |
#find_modules(branch) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/vx/builder/build_configuration/deploy.rb', line 32 def find_modules(branch) modules = [] Base.loaded.each do |l| attributes.each do |attr| if l.detect(attr) modules << l.new(attr) end end end modules.select{ |m| m.branch?(branch) } end |