Class: Samus::BuildAction
Instance Attribute Summary collapse
-
#publish ⇒ Object
Returns the value of attribute publish.
-
#pwd ⇒ Object
writeonly
Sets the attribute pwd.
-
#skip ⇒ Object
readonly
Returns the value of attribute skip.
Attributes inherited from Action
Instance Method Summary collapse
- #command_options ⇒ Object
- #condition=(condition) ⇒ Object
-
#initialize(opts = {}) ⇒ BuildAction
constructor
A new instance of BuildAction.
- #run ⇒ Object
- #stage ⇒ Object
Methods inherited from Action
#action=, #allowFail=, #arguments=, #credentials=, #load
Constructor Details
#initialize(opts = {}) ⇒ BuildAction
Returns a new instance of BuildAction.
5 6 7 8 9 |
# File 'lib/samus/build_action.rb', line 5 def initialize(opts = {}) super(opts) @pwd = nil @skip = false end |
Instance Attribute Details
#publish ⇒ Object
Returns the value of attribute publish.
11 12 13 |
# File 'lib/samus/build_action.rb', line 11 def publish @publish end |
#pwd=(value) ⇒ Object (writeonly)
Sets the attribute pwd
21 22 23 |
# File 'lib/samus/build_action.rb', line 21 def pwd=(value) @pwd = value end |
#skip ⇒ Object (readonly)
Returns the value of attribute skip.
35 36 37 |
# File 'lib/samus/build_action.rb', line 35 def skip @skip end |
Instance Method Details
#command_options ⇒ Object
17 18 19 |
# File 'lib/samus/build_action.rb', line 17 def super.merge(pwd: @pwd) end |
#condition=(condition) ⇒ Object
36 37 38 39 40 41 |
# File 'lib/samus/build_action.rb', line 36 def condition=(condition) @skip = !eval(condition) rescue StandardError => e puts "[E] Condition failed on #{@raw_options['action']}" raise e end |
#run ⇒ Object
23 24 25 26 |
# File 'lib/samus/build_action.rb', line 23 def run return if @skip super end |
#stage ⇒ Object
13 14 15 |
# File 'lib/samus/build_action.rb', line 13 def stage 'build' end |