Class: Cerbos::Hub::Stores::Input::ChangeDetails::Origin::Internal

Inherits:
Cerbos::Hub::Stores::Input::ChangeDetails::Origin show all
Defined in:
lib/cerbos/hub/stores/input/change_details/origin.rb

Overview

Details of a change made to a store by an internal application.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source: "", metadata: {}) ⇒ Internal

Specify details of a change made to a store by an internal application.

Parameters:

  • source (String) (defaults to: "")

    the source of the change.

  • metadata (Cerbos::Input::Attributes, Hash) (defaults to: {})

    user-defined metadata about the origin of the change.



119
120
121
122
# File 'lib/cerbos/hub/stores/input/change_details/origin.rb', line 119

def initialize(source: "", metadata: {})
  @source = source
  @metadata = Cerbos::Input.coerce_required(, Cerbos::Input::Attributes)
end

Instance Attribute Details

#metadataCerbos::Input::Attributes (readonly)

User-defined metadata about the origin of the change.



113
114
115
# File 'lib/cerbos/hub/stores/input/change_details/origin.rb', line 113

def 
  @metadata
end

#sourceString (readonly)

The source of the change.

Returns:

  • (String)


108
109
110
# File 'lib/cerbos/hub/stores/input/change_details/origin.rb', line 108

def source
  @source
end