Class: Cerbos::Input::Attributes

Inherits:
Object
  • Object
show all
Defined in:
lib/cerbos/input/attributes.rb

Overview

Attributes for a principal or resource.

Instance Method Summary collapse

Constructor Details

#initialize(**attributes) ⇒ Attributes

Specify a principal's or resource's attributes.

Parameters:

  • attributes (Hash{Symbol => String, Numeric, Boolean, Array, Hash, nil})

    the principal's or resource's attributes.



10
11
12
# File 'lib/cerbos/input/attributes.rb', line 10

def initialize(**attributes)
  @attributes = attributes
end

Instance Method Details

#to_hashHash{Symbol => String, Numeric, Boolean, Array, Hash, nil} Also known as: to_h

The principal's or resource's attributes.

Returns:

  • (Hash{Symbol => String, Numeric, Boolean, Array, Hash, nil})


17
18
19
# File 'lib/cerbos/input/attributes.rb', line 17

def to_hash
  @attributes
end