class ViewModel::AccessControl::Composed::NoRequiredConditionsError
Error type when no `if` conditions succeed.
Attributes
reasons[R]
Public Class Methods
new(nodes, reasons)
click to toggle source
Calls superclass method
ViewModel::AccessControlError::new
# File lib/view_model/access_control/composed.rb, line 67 def initialize(nodes, reasons) super('Action not permitted because none of the possible conditions were met.', nodes) @reasons = reasons end
Public Instance Methods
merge(other)
click to toggle source
# File lib/view_model/access_control/composed.rb, line 76 def merge(other) NoRequiredConditionsError.new(nodes | other.nodes, Lazily.concat(reasons, other.reasons).uniq) end
meta()
click to toggle source
Calls superclass method
ViewModel::AbstractErrorWithBlame#meta
# File lib/view_model/access_control/composed.rb, line 72 def meta super.merge(conditions: @reasons.to_a) end