Class: RailsIam::Authentication::SkipAuthenticationRule
- Inherits:
-
Data
- Object
- Data
- RailsIam::Authentication::SkipAuthenticationRule
- Defined in:
- app/services/rails_iam/authentication/skip_authentication_rule.rb
Instance Attribute Summary collapse
-
#except ⇒ Object
readonly
Returns the value of attribute except.
-
#only ⇒ Object
readonly
Returns the value of attribute only.
Instance Method Summary collapse
Instance Attribute Details
#except ⇒ Object (readonly)
Returns the value of attribute except
5 6 7 |
# File 'app/services/rails_iam/authentication/skip_authentication_rule.rb', line 5 def except @except end |
#only ⇒ Object (readonly)
Returns the value of attribute only
5 6 7 |
# File 'app/services/rails_iam/authentication/skip_authentication_rule.rb', line 5 def only @only end |
Instance Method Details
#matches?(action) ⇒ Boolean
9 10 11 12 13 14 15 16 17 |
# File 'app/services/rails_iam/authentication/skip_authentication_rule.rb', line 9 def matches?(action) action = action.to_sym return Array(only).map(&:to_sym).include?(action) if only.present? return Array(except).map(&:to_sym).exclude?(action) if except.present? true end |