Sha256: 4f42f823a2a0c7ea0378f4499251aa8ee5c156222ba058d7400e819020224b82

Contents?: true

Size: 404 Bytes

Versions: 22

Compression:

Stored size: 404 Bytes

Contents

module Pork
  class Env < Struct.new(:super_env, :before, :after)
    def initialize se=nil
      super(se, [], [])
    end

    def run_before context
      super_env && super_env.run_before(context)
      before.each{ |b| context.instance_eval(&b) }
    end

    def run_after context
      super_env && super_env.run_after(context)
      after.each{ |b| context.instance_eval(&b) }
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
pork-1.5.0 lib/pork/env.rb
pork-1.4.4 lib/pork/env.rb
pork-1.4.3 lib/pork/env.rb
pork-1.4.2 lib/pork/env.rb
pork-1.4.1 lib/pork/env.rb
pork-1.4.0 lib/pork/env.rb
pork-1.3.1 lib/pork/env.rb
pork-1.3.0 lib/pork/env.rb
pork-1.2.4 lib/pork/env.rb
pork-1.2.3 lib/pork/env.rb
pork-1.2.2 lib/pork/env.rb
pork-1.2.1 lib/pork/env.rb
pork-1.2.0 lib/pork/env.rb
pork-1.1.3 lib/pork/env.rb
pork-1.1.2 lib/pork/env.rb
pork-1.1.1 lib/pork/env.rb
pork-1.1.0 lib/pork/env.rb
pork-1.0.4 lib/pork/env.rb
pork-1.0.3 lib/pork/env.rb
pork-1.0.2 lib/pork/env.rb