Class: Parabot::Messaging::DryRunAdapter
- Includes:
- DryRunLogging
- Defined in:
- lib/parabot/messaging/dry_run_adapter.rb
Overview
Dry-run implementation of the MessagingAdapter that logs actions without executing them
Instance Method Summary collapse
-
#abort ⇒ Boolean
Always true (simulated success).
-
#end_session ⇒ Boolean
Always true (simulated success).
-
#initialize(dry_run: true, **_kwargs) ⇒ DryRunAdapter
constructor
A new instance of DryRunAdapter.
-
#send_message(message) ⇒ Boolean
Always true (simulated success).
-
#session_active? ⇒ Boolean
Always true (simulated active session).
-
#start_session(system_prompt: nil) ⇒ Boolean
Always true (simulated success).
Constructor Details
#initialize(dry_run: true, **_kwargs) ⇒ DryRunAdapter
Returns a new instance of DryRunAdapter.
12 13 14 |
# File 'lib/parabot/messaging/dry_run_adapter.rb', line 12 def initialize(dry_run: true, **_kwargs) @dry_run = dry_run end |
Instance Method Details
#abort ⇒ Boolean
Returns always true (simulated success).
43 44 45 46 |
# File 'lib/parabot/messaging/dry_run_adapter.rb', line 43 def abort dry_run_log "Would send abort command (ESC key) to Claude" true end |
#end_session ⇒ Boolean
Returns always true (simulated success).
37 38 39 40 |
# File 'lib/parabot/messaging/dry_run_adapter.rb', line 37 def end_session dry_run_log "Would end Claude session" true end |
#send_message(message) ⇒ Boolean
Returns always true (simulated success).
18 19 20 21 22 |
# File 'lib/parabot/messaging/dry_run_adapter.rb', line 18 def () dry_run_log "Would send message to Claude:" puts true end |
#session_active? ⇒ Boolean
Returns always true (simulated active session).
49 50 51 52 |
# File 'lib/parabot/messaging/dry_run_adapter.rb', line 49 def session_active? dry_run_log "Would check if Claude session is active" true end |
#start_session(system_prompt: nil) ⇒ Boolean
Returns always true (simulated success).
26 27 28 29 30 31 32 33 34 |
# File 'lib/parabot/messaging/dry_run_adapter.rb', line 26 def start_session(system_prompt: nil) dry_run_log "Would start Claude session" if system_prompt dry_run_log "Would use system prompt: #{system_prompt[0..100]}#{'...' if system_prompt.length > 100}" else dry_run_log "Would start without system prompt" end true end |