Class: ExamRegistration::AuthorizationCriterion::None

Inherits:
ExamRegistration::AuthorizationCriterion show all
Defined in:
app/models/exam_registration/authorization_criterion.rb

Instance Attribute Summary

Attributes inherited from ExamRegistration::AuthorizationCriterion

#value

Instance Method Summary collapse

Methods inherited from ExamRegistration::AuthorizationCriterion

#as_json, #authorization_criteria_matcher, #authorization_status_for, #ensure_valid!, #meets_authorization_criteria?, parse, parse_criterion_type, #process_request!, #type

Constructor Details

#initialize(_) ⇒ None

Returns a new instance of None.



48
49
50
# File 'app/models/exam_registration/authorization_criterion.rb', line 48

def initialize(_)
  @value = nil
end

Instance Method Details

#criterion_matcherObject



60
61
62
# File 'app/models/exam_registration/authorization_criterion.rb', line 60

def criterion_matcher
  {}
end

#meets_criterion?(_user, _organization) ⇒ Boolean

Returns:

  • (Boolean)


56
57
58
# File 'app/models/exam_registration/authorization_criterion.rb', line 56

def meets_criterion?(_user, _organization)
  true
end

#valid?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'app/models/exam_registration/authorization_criterion.rb', line 52

def valid?
  !value
end