Class: Cerbos::Hub::Stores::Input::ChangeDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/cerbos/hub/stores/input/change_details.rb,
lib/cerbos/hub/stores/input/change_details/origin.rb,
lib/cerbos/hub/stores/input/change_details/uploader.rb

Overview

Metadata describing a change that was made to a store.

Defined Under Namespace

Classes: Origin, Uploader

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description: "", origin: nil, uploader: nil) ⇒ ChangeDetails

Specify metadata describing a change that was made to a store.

Parameters:

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

    description of the change.

  • origin (Origin, Hash, nil) (defaults to: nil)

    origin of the change.

  • uploader (Uploader, Hash, nil) (defaults to: nil)

    metadata describing the uploader who made the change.



31
32
33
34
35
# File 'lib/cerbos/hub/stores/input/change_details.rb', line 31

def initialize(description: "", origin: nil, uploader: nil)
  @description = description
  @origin = Cerbos::Input.coerce_optional(origin, Origin)
  @uploader = Cerbos::Input.coerce_optional(uploader, Uploader)
end

Instance Attribute Details

#descriptionString (readonly)

Description of the change.

Returns:

  • (String)


12
13
14
# File 'lib/cerbos/hub/stores/input/change_details.rb', line 12

def description
  @description
end

#originOrigin? (readonly)

Origin of the change.

Returns:

  • (Origin)
  • (nil)

    if not provided



18
19
20
# File 'lib/cerbos/hub/stores/input/change_details.rb', line 18

def origin
  @origin
end

#uploaderUploader? (readonly)

Metadata describing the uploader who made the change.

Returns:



24
25
26
# File 'lib/cerbos/hub/stores/input/change_details.rb', line 24

def uploader
  @uploader
end