Module: Perkins::Build::Script::Stages
- Included in:
- Perkins::Build::Script
- Defined in:
- lib/perkins/build/script/stages.rb
Instance Method Summary collapse
- #call_custom_stage(stage) ⇒ Object
- #run_builtin_stage(stage) ⇒ Object
- #run_stage(stage) ⇒ Object
- #run_stages ⇒ Object
Instance Method Details
#call_custom_stage(stage) ⇒ Object
20 21 22 23 |
# File 'lib/perkins/build/script/stages.rb', line 20 def call_custom_stage(stage) #binding.pry @config.send(stage).present? ? cmd(@config.send(stage)) : self.send(stage) end |
#run_builtin_stage(stage) ⇒ Object
11 12 13 |
# File 'lib/perkins/build/script/stages.rb', line 11 def run_builtin_stage(stage) self.send(stage) end |
#run_stage(stage) ⇒ Object
15 16 17 18 |
# File 'lib/perkins/build/script/stages.rb', line 15 def run_stage(stage) puts "call #{stage}" call_custom_stage(stage) end |
#run_stages ⇒ Object
6 7 8 9 |
# File 'lib/perkins/build/script/stages.rb', line 6 def run_stages STAGES[:builtin].each { |stage| run_builtin_stage(stage) } STAGES[:custom].each { |stage| run_stage(stage) } end |