Sha256: cad96d30d1397e3931c69a8fa499b966e52b94d3a2c2614623c8e7666ce34823

Contents?: true

Size: 914 Bytes

Versions: 49

Compression:

Stored size: 914 Bytes

Contents

class ExtensionOne < ::Middleman::Extension
  helpers do
    def extension_two_was_activated
      extensions[:extension_one].extension_two_was_activated
    end
  end

  attr_reader :extension_two_was_activated

  def initialize(app, options_hash={})
    super

    after_extension_activated :extension_two do
      @extension_two_was_activated = true
    end
  end
end

Middleman::Extensions.register :extension_one, ExtensionOne

class ExtensionTwo < ::Middleman::Extension
  helpers do
    def extension_one_was_activated
      extensions[:extension_two].extension_one_was_activated
    end
  end

  attr_reader :extension_one_was_activated

  def initialize(app, options_hash={})
    super

    after_extension_activated :extension_one do
      @extension_one_was_activated = true
    end
  end
end

Middleman::Extensions.register :extension_two, ExtensionTwo

activate :extension_one
activate :extension_two

Version data entries

49 entries across 49 versions & 3 rubygems

Version Path
middleman-core-4.5.1 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.5.0 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.4.3 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.4.2 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.4.0 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.3.11 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.3.10 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.3.8 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.3.7 fixtures/v4-extension-callbacks/config.rb
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/middleman-core-4.3.3/fixtures/v4-extension-callbacks/config.rb
middleman-core-4.3.6 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.3.5 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.3.4 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.3.3 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.3.2 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.3.1 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.3.0 fixtures/v4-extension-callbacks/config.rb
middleman-core-with-external-sources-watch-fix-4.1.10 fixtures/v4-extension-callbacks/config.rb
middleman-core-with-external-sources-watch-fix-4.1.0 fixtures/v4-extension-callbacks/config.rb
middleman-core-4.3.0.rc.1 fixtures/v4-extension-callbacks/config.rb