Class: RailsAiContext::BootManager::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/rails_ai_context/boot_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorObject

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



30
31
32
# File 'lib/rails_ai_context/boot_manager.rb', line 30

def error
  @error
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



30
31
32
# File 'lib/rails_ai_context/boot_manager.rb', line 30

def status
  @status
end

Instance Method Details

#booted?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/rails_ai_context/boot_manager.rb', line 31

def booted?
  status == :booted
end

#failure_summaryObject

One-line summary safe to relay to an AI client or a terminal.



36
37
38
39
40
# File 'lib/rails_ai_context/boot_manager.rb', line 36

def failure_summary
  return nil if booted?

  "#{error.class}: #{error.message.to_s.lines.first&.strip}"
end