Module: Perkins::Build::Script::Helpers
- Included in:
- Perkins::Build::Script
- Defined in:
- lib/perkins/build/script/helpers.rb
Instance Method Summary collapse
- #announce?(stage) ⇒ Boolean
- #before_install ⇒ Object
- #failure(message) ⇒ Object
- #sh ⇒ Object
- #stacking ⇒ Object
Instance Method Details
#announce?(stage) ⇒ Boolean
33 34 35 |
# File 'lib/perkins/build/script/helpers.rb', line 33 def announce?(stage) stage && stage != :after_result end |
#before_install ⇒ Object
29 30 31 |
# File 'lib/perkins/build/script/helpers.rb', line 29 def before_install puts "before install" end |
#failure(message) ⇒ Object
16 17 18 19 |
# File 'lib/perkins/build/script/helpers.rb', line 16 def failure() echo raw 'false' end |
#sh ⇒ Object
12 13 14 |
# File 'lib/perkins/build/script/helpers.rb', line 12 def sh stack.last end |
#stacking ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/perkins/build/script/helpers.rb', line 21 def stacking ->(sh) { stack.push(sh) yield(sh) if block_given? stack.pop } end |