class Vx::Builder::BuildConfiguration::Deploy::Base
Attributes
branch[R]
params[R]
Public Class Methods
detect(params)
click to toggle source
# File lib/vx/builder/build_configuration/deploy/base.rb, line 25 def detect(params) params.key?(key.to_s) if key end
key()
click to toggle source
# File lib/vx/builder/build_configuration/deploy/base.rb, line 21 def key @key end
loaded()
click to toggle source
# File lib/vx/builder/build_configuration/deploy/base.rb, line 12 def loaded @@loaded end
module_by_key(val)
click to toggle source
# File lib/vx/builder/build_configuration/deploy/base.rb, line 29 def module_by_key(val) loaded.find{|i| i.key.to_s == val.to_s } end
new(params)
click to toggle source
# File lib/vx/builder/build_configuration/deploy/base.rb, line 36 def initialize(params) @params = params.is_a?(Hash) ? params : {} self.branch = params["branch"] end
provide(val)
click to toggle source
# File lib/vx/builder/build_configuration/deploy/base.rb, line 16 def provide(val) loaded.push self @key = val end
Public Instance Methods
branch=(value)
click to toggle source
# File lib/vx/builder/build_configuration/deploy/base.rb, line 41 def branch=(value) @branch = Array(value).map(&:to_s) end
branch?(name)
click to toggle source
# File lib/vx/builder/build_configuration/deploy/base.rb, line 45 def branch?(name) case when branch.empty? true when !name true else branch.include?(name) end end
key()
click to toggle source
# File lib/vx/builder/build_configuration/deploy/base.rb, line 56 def key if self.class.key @key ||= Array(params[self.class.key.to_s]) end end
to_commands()
click to toggle source
# File lib/vx/builder/build_configuration/deploy/base.rb, line 70 def to_commands nil end
to_hash()
click to toggle source
# File lib/vx/builder/build_configuration/deploy/base.rb, line 62 def to_hash if key { self.class.key.to_s => key } else {} end end