Exception: Clearbooks::NoSolutionError

Inherits:
ClearbooksError show all
Defined in:
lib/clearbooks/error/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ClearbooksError

status_code

Constructor Details

#initialize(demands) ⇒ NoSolutionError

Returns a new instance of NoSolutionError.

Parameters:

  • demands (Array<Dependency>)


80
81
82
# File 'lib/clearbooks/error/errors.rb', line 80

def initialize(demands)
  @demands = demands
end

Instance Attribute Details

#demandsObject (readonly)

Returns the value of attribute demands.



77
78
79
# File 'lib/clearbooks/error/errors.rb', line 77

def demands
  @demands
end

Instance Method Details

#to_sObject



84
85
86
# File 'lib/clearbooks/error/errors.rb', line 84

def to_s
  "Unable to find a solution for demands: #{demands.join(', ')}"
end