Class: ContentfulMiddleman::Core
- Inherits:
-
Middleman::Extension
- Object
- Middleman::Extension
- ContentfulMiddleman::Core
- Defined in:
- lib/contentful_middleman/core.rb
Instance Attribute Summary collapse
-
#middleman_app ⇒ Object
readonly
Returns the value of attribute middleman_app.
Instance Method Summary collapse
-
#after_configuration ⇒ Object
Middleman hooks.
-
#initialize(app, options_hash = {}, &block) ⇒ Core
constructor
A new instance of Core.
- #webhook_options ⇒ Object
Constructor Details
#initialize(app, options_hash = {}, &block) ⇒ Core
Returns a new instance of Core.
50 51 52 53 54 55 56 57 58 |
# File 'lib/contentful_middleman/core.rb', line 50 def initialize(app, = {}, &block) super @middleman_app = app this = self # Hack due to context change app.before_server do this. end end |
Instance Attribute Details
#middleman_app ⇒ Object (readonly)
Returns the value of attribute middleman_app.
49 50 51 |
# File 'lib/contentful_middleman/core.rb', line 49 def middleman_app @middleman_app end |
Instance Method Details
#after_configuration ⇒ Object
Middleman hooks
63 64 65 66 67 |
# File 'lib/contentful_middleman/core.rb', line 63 def after_configuration ContentfulMiddleman.instances << (ContentfulMiddleman::Instance.new self) end |
#webhook_options ⇒ Object
69 70 71 |
# File 'lib/contentful_middleman/core.rb', line 69 def ::ContentfulMiddleman::WebhookHandler.start() if .rebuild_on_webhook end |