Module: Omen::Asked

Extended by:
ActiveSupport::Concern
Included in:
Reading
Defined in:
app/models/omen/asked.rb

Overview

Extends Omen::Reading with the way a question is added to it.

Instance Method Summary collapse

Instance Method Details

#answering?Boolean

Returns whether Claude is still working on the last question.

Returns:

  • (Boolean)

    whether Claude is still working on the last question.



9
# File 'app/models/omen/asked.rb', line 9

def answering? = (unstarted? || started?) && fresh?

#ask(question) ⇒ Omen::Question

Records what was typed, which is what sets a run going.

Parameters:

  • question (String)

    what the asker wants to know.

Returns:



6
# File 'app/models/omen/asked.rb', line 6

def ask(question) = questions.create! content: [ { type: 'text', text: question } ]