Method: Casbin::Model::Assertion#initialize

Defined in:
lib/casbin-ruby/model/assertion.rb

#initialize(hash = {}) ⇒ Assertion

Returns a new instance of Assertion.



10
11
12
13
14
15
# File 'lib/casbin-ruby/model/assertion.rb', line 10

def initialize(hash = {})
  @key = hash[:key].to_s
  @value = hash[:value].to_s
  @tokens = [*hash[:tokens]]
  @policy = [*hash[:policy]]
end