Sha256: 1a18ad80a30cbd2d127fc379a1aceb2bb7e8f690b20cfa6eecffd61ce74ef000

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

module Perkins
  module Build
    class Script
      module Stages

        def run_stages
          STAGES[:builtin].each { |stage| run_builtin_stage(stage) }
          STAGES[:custom].each  { |stage| run_stage(stage) }
        end

        def run_builtin_stage(stage)
          self.send(stage)
        end

        def run_stage(stage)
          puts "call #{stage}"
          call_custom_stage(stage)
        end

        def call_custom_stage(stage)
          @config.send(stage).present? ? cmd(@config.send(stage)) : self.send(stage)
        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
perkins-0.0.5 lib/perkins/build/script/stages.rb