Class: Assistant::BrainCompactor::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/assistant/brain_compactor.rb

Overview

Service result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(recommendations: [], analyzed_count: 0, model_id: nil, error: nil) ⇒ Result

Returns a new instance of Result.



34
35
36
# File 'app/services/assistant/brain_compactor.rb', line 34

def initialize(recommendations: [], analyzed_count: 0, model_id: nil, error: nil)
  super
end

Instance Attribute Details

#analyzed_countObject (readonly)

Returns the value of attribute analyzed_count

Returns:

  • (Object)

    the current value of analyzed_count



33
34
35
# File 'app/services/assistant/brain_compactor.rb', line 33

def analyzed_count
  @analyzed_count
end

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



33
34
35
# File 'app/services/assistant/brain_compactor.rb', line 33

def error
  @error
end

#model_idObject (readonly)

Returns the value of attribute model_id

Returns:

  • (Object)

    the current value of model_id



33
34
35
# File 'app/services/assistant/brain_compactor.rb', line 33

def model_id
  @model_id
end

#recommendationsObject (readonly)

Returns the value of attribute recommendations

Returns:

  • (Object)

    the current value of recommendations



33
34
35
# File 'app/services/assistant/brain_compactor.rb', line 33

def recommendations
  @recommendations
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


38
# File 'app/services/assistant/brain_compactor.rb', line 38

def success? = error.nil?