Sha256: 94f4c4200cc27b531d5dbcb96f71b945ff97f4f2e4b5533f8b90e1526945fa68

Contents?: true

Size: 370 Bytes

Versions: 13

Compression:

Stored size: 370 Bytes

Contents

module Kubes::Hooks
  module Dsl
    def before(*commands, **props)
      commands.each do |name|
        each_hook(:before, name, props)
      end
    end

    def after(*commands, **props)
      commands.each do |name|
        each_hook(:after, name, props)
      end
    end

    def each_hook(type, name, props={})
      @hooks[type][name] = props
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
kubes-0.3.5 lib/kubes/hooks/dsl.rb
kubes-0.3.4 lib/kubes/hooks/dsl.rb
kubes-0.3.3 lib/kubes/hooks/dsl.rb
kubes-0.3.2 lib/kubes/hooks/dsl.rb
kubes-0.3.1 lib/kubes/hooks/dsl.rb
kubes-0.3.0 lib/kubes/hooks/dsl.rb
kubes-0.2.6 lib/kubes/hooks/dsl.rb
kubes-0.2.5 lib/kubes/hooks/dsl.rb
kubes-0.2.4 lib/kubes/hooks/dsl.rb
kubes-0.2.3 lib/kubes/hooks/dsl.rb
kubes-0.2.2 lib/kubes/hooks/dsl.rb
kubes-0.2.1 lib/kubes/hooks/dsl.rb
kubes-0.2.0 lib/kubes/hooks/dsl.rb