Class: RubyEventStore::Browser::ExtensionContext
- Inherits:
-
Object
- Object
- RubyEventStore::Browser::ExtensionContext
- Defined in:
- lib/ruby_event_store/browser/extension_context.rb
Instance Attribute Summary collapse
-
#event_store ⇒ Object
readonly
Returns the value of attribute event_store.
Instance Method Summary collapse
-
#initialize(event_store, layout) ⇒ ExtensionContext
constructor
A new instance of ExtensionContext.
- #not_found(urls, message: "Page not found") ⇒ Object
- #render(template, urls:, title: nil, **locals) ⇒ Object
Constructor Details
#initialize(event_store, layout) ⇒ ExtensionContext
Returns a new instance of ExtensionContext.
8 9 10 11 |
# File 'lib/ruby_event_store/browser/extension_context.rb', line 8 def initialize(event_store, layout) @event_store = event_store @layout = layout end |
Instance Attribute Details
#event_store ⇒ Object (readonly)
Returns the value of attribute event_store.
6 7 8 |
# File 'lib/ruby_event_store/browser/extension_context.rb', line 6 def event_store @event_store end |
Instance Method Details
#not_found(urls, message: "Page not found") ⇒ Object
17 18 19 |
# File 'lib/ruby_event_store/browser/extension_context.rb', line 17 def not_found(urls, message: "Page not found") @layout.not_found(urls, message: ) end |
#render(template, urls:, title: nil, **locals) ⇒ Object
13 14 15 |
# File 'lib/ruby_event_store/browser/extension_context.rb', line 13 def render(template, urls:, title: nil, **locals) @layout.render(template, urls: urls, title: title, **locals) end |