Class: Decidim::ActionAuthorizer::AuthorizationStatus

Inherits:
Object
  • Object
show all
Defined in:
app/services/decidim/action_authorizer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject (readonly)

Returns the value of attribute code.



88
89
90
# File 'app/services/decidim/action_authorizer.rb', line 88

def code
  @code
end

#dataObject (readonly)

Returns the value of attribute data.



88
89
90
# File 'app/services/decidim/action_authorizer.rb', line 88

def data
  @data
end

#handler_nameObject (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

Returns:

  • (Boolean)


96
97
98
# File 'app/services/decidim/action_authorizer.rb', line 96

def ok?
  @code == :ok
end