Class: Decidim::ActionAuthorizer::AuthorizationStatus
- Inherits:
-
Object
- Object
- Decidim::ActionAuthorizer::AuthorizationStatus
- Defined in:
- app/services/decidim/action_authorizer.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#handler_name ⇒ Object
readonly
Returns the value of attribute handler_name.
Instance Method Summary collapse
-
#initialize(code, handler_name, data) ⇒ AuthorizationStatus
constructor
A new instance of AuthorizationStatus.
- #ok? ⇒ Boolean
Constructor Details
#initialize(code, handler_name, data) ⇒ AuthorizationStatus
Returns a new instance of AuthorizationStatus.
90 91 92 93 94 |
# File 'app/services/decidim/action_authorizer.rb', line 90 def initialize(code, handler_name, data) @code = code.to_sym @handler_name = handler_name @data = data.symbolize_keys end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
88 89 90 |
# File 'app/services/decidim/action_authorizer.rb', line 88 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
88 89 90 |
# File 'app/services/decidim/action_authorizer.rb', line 88 def data @data end |
#handler_name ⇒ Object (readonly)
Returns the value of attribute handler_name.
88 89 90 |
# File 'app/services/decidim/action_authorizer.rb', line 88 def handler_name @handler_name end |
Instance Method Details
#ok? ⇒ Boolean
96 97 98 |
# File 'app/services/decidim/action_authorizer.rb', line 96 def ok? @code == :ok end |