Class: Vx::Builder::BuildConfiguration::Deploy::Provider
- Inherits:
-
Object
- Object
- Vx::Builder::BuildConfiguration::Deploy::Provider
- Defined in:
- lib/vx/builder/build_configuration/deploy/provider.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#on ⇒ Object
readonly
Returns the value of attribute on.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #branch?(branch) ⇒ Boolean
- #command ⇒ Object
-
#initialize(new_attributes) ⇒ Provider
constructor
A new instance of Provider.
- #shell? ⇒ Boolean
- #to_hash ⇒ Object
Constructor Details
#initialize(new_attributes) ⇒ Provider
Returns a new instance of Provider.
10 11 12 |
# File 'lib/vx/builder/build_configuration/deploy/provider.rb', line 10 def initialize(new_attributes) normalize new_attributes.dup end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/vx/builder/build_configuration/deploy/provider.rb', line 8 def name @name end |
#on ⇒ Object (readonly)
Returns the value of attribute on.
8 9 10 |
# File 'lib/vx/builder/build_configuration/deploy/provider.rb', line 8 def on @on end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/vx/builder/build_configuration/deploy/provider.rb', line 8 def @options end |
Instance Method Details
#branch?(branch) ⇒ Boolean
14 15 16 17 |
# File 'lib/vx/builder/build_configuration/deploy/provider.rb', line 14 def branch?(branch) return true if on.empty? on.include?(branch) end |
#command ⇒ Object
30 31 32 |
# File 'lib/vx/builder/build_configuration/deploy/provider.rb', line 30 def command Array(["command"]) end |
#shell? ⇒ Boolean
26 27 28 |
# File 'lib/vx/builder/build_configuration/deploy/provider.rb', line 26 def shell? @name == 'shell' end |
#to_hash ⇒ Object
19 20 21 22 23 24 |
# File 'lib/vx/builder/build_configuration/deploy/provider.rb', line 19 def to_hash .merge( "provider" => @name, "branch" => on ) end |