Sha256: d999b83af3f620c4e10c5c17ebb75e210bef0d68b579656ea2868216ddf55bb8

Contents?: true

Size: 675 Bytes

Versions: 14

Compression:

Stored size: 675 Bytes

Contents

module Blocks
  class HookDefinition < OptionsSet
    BEFORE_ALL = :before_all
    AROUND_ALL = :around_all
    BEFORE = :before
    AROUND = :around
    SURROUND = :surround
    PREPEND = :prepend
    APPEND = :append
    AFTER = :after
    AFTER_ALL = :after_all

    HOOKS = [BEFORE_ALL, BEFORE, PREPEND,
             AROUND_ALL, AROUND, SURROUND,
             APPEND, AFTER, AFTER_ALL]

    attr_accessor :block_definition, :hook_type

    def initialize(block_definition, hook_type, *args, &block)
      self.block_definition = block_definition
      self.hook_type = hook_type
      super "#{hook_type} #{block_definition.name} options", *args, &block
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
blocks-3.0.4 lib/blocks/builders/hook_definition.rb
blocks-3.0.3 lib/blocks/builders/hook_definition.rb
blocks-3.0.2 lib/blocks/builders/hook_definition.rb
blocks-3.0.1 lib/blocks/builders/hook_definition.rb
blocks-3.0.0 lib/blocks/builders/hook_definition.rb
blocks-3.0.0.rc9 lib/blocks/builders/hook_definition.rb
blocks-3.0.0.rc8 lib/blocks/builders/hook_definition.rb
blocks-3.0.0.rc7 lib/blocks/builders/hook_definition.rb
blocks-3.0.0.rc6 lib/blocks/builders/hook_definition.rb
blocks-3.0.0.rc5 lib/blocks/builders/hook_definition.rb
blocks-3.0.0.rc4 lib/blocks/builders/hook_definition.rb
blocks-3.0.0.rc3 lib/blocks/builders/hook_definition.rb
blocks-3.0.0.rc2 lib/blocks/builders/hook_definition.rb
blocks-3.0.0.rc1 lib/blocks/builders/hook_definition.rb