Module: Pinmark
- Defined in:
- lib/pinmark.rb,
lib/pinmark/phlex.rb,
lib/pinmark/engine.rb,
lib/pinmark/tracker.rb,
lib/pinmark/version.rb,
lib/pinmark/wrapper.rb,
lib/pinmark/mcp/queue.rb,
lib/pinmark/mcp/server.rb,
lib/pinmark/stylesheets.rb,
lib/pinmark/mcp/rack_app.rb,
lib/pinmark/source_locator.rb,
lib/pinmark/hooks/erb_partial.rb,
lib/pinmark/hooks/view_component.rb,
lib/pinmark/mcp/tools/list_pending.rb,
lib/pinmark/mcp/tools/list_resolved.rb,
lib/pinmark/mcp/tools/mark_addressed.rb,
lib/pinmark/mcp/tools/clear_addressed.rb,
app/controllers/concerns/pinmark/session.rb,
app/controllers/pinmark/annotations_controller.rb,
app/controllers/pinmark/application_controller.rb,
lib/generators/pinmark/install/install_generator.rb
Defined Under Namespace
Modules: Generators, Hooks, Mcp, Phlex, Session, SourceLocator, Stylesheets, Wrapper Classes: AnnotationsController, ApplicationController, Engine, Tracker
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
-
.active? ⇒ Boolean
Whether the pinmark hooks should be active for the current request.
- .tracker ⇒ Object
Class Method Details
.active? ⇒ Boolean
Whether the pinmark hooks should be active for the current request. The host app sets Pinmark.tracker (typically per-request via the Session concern) when the dev cookie / param toggles annotations on.
We intentionally keep the predicate cheap so the wrapper / hooks can call it on every render in development without measurable overhead.
27 28 29 |
# File 'lib/pinmark.rb', line 27 def self.active? Rails.env.development? && tracker.present? end |
.tracker ⇒ Object
31 32 33 34 35 |
# File 'lib/pinmark.rb', line 31 def self.tracker return nil unless defined?(::Current) && ::Current.respond_to?(:pinmark) ::Current.pinmark end |