2013-06-04 18:51:03 -04:00
|
|
|
class ExtensionOne < ::Middleman::Extension
|
2013-12-31 21:21:30 -05:00
|
|
|
helpers do
|
|
|
|
def extension_two_was_activated
|
|
|
|
extensions[:extension_one].extension_two_was_activated
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
attr_reader :extension_two_was_activated
|
|
|
|
|
2013-06-04 18:51:03 -04:00
|
|
|
def initialize(app, options_hash={})
|
|
|
|
super
|
|
|
|
|
|
|
|
after_extension_activated :extension_two do
|
2013-12-31 21:21:30 -05:00
|
|
|
@extension_two_was_activated = true
|
2013-06-04 18:51:03 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-03-29 17:29:42 -04:00
|
|
|
Middleman::Extensions.register :extension_one, ExtensionOne
|
2013-06-04 18:51:03 -04:00
|
|
|
|
|
|
|
class ExtensionTwo < ::Middleman::Extension
|
2013-12-31 21:21:30 -05:00
|
|
|
helpers do
|
|
|
|
def extension_one_was_activated
|
|
|
|
extensions[:extension_two].extension_one_was_activated
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
attr_reader :extension_one_was_activated
|
|
|
|
|
2013-06-04 18:51:03 -04:00
|
|
|
def initialize(app, options_hash={})
|
|
|
|
super
|
|
|
|
|
|
|
|
after_extension_activated :extension_one do
|
2013-12-31 21:21:30 -05:00
|
|
|
@extension_one_was_activated = true
|
2013-06-04 18:51:03 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-03-29 17:29:42 -04:00
|
|
|
Middleman::Extensions.register :extension_two, ExtensionTwo
|
2013-06-04 18:51:03 -04:00
|
|
|
|
|
|
|
activate :extension_one
|
2014-03-29 17:29:42 -04:00
|
|
|
activate :extension_two
|