Class: Cerbos::Hub::Stores::Input::FileFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/cerbos/hub/stores/input/file_filter.rb

Overview

A filter to match files when listing store contents.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path: nil) ⇒ FileFilter

Specify a filter to match files when listing store contents.

Parameters:

  • path (StringMatch, Hash, nil) (defaults to: nil)

    match files by path.



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

def initialize(path: nil)
  @path = Cerbos::Input.coerce_optional(path, StringMatch)
end

Instance Attribute Details

#pathStringMatch? (readonly)

Match files by path.

Returns:



13
14
15
# File 'lib/cerbos/hub/stores/input/file_filter.rb', line 13

def path
  @path
end