Module: OAuth2::FilteredAttributes::ClassMethods
- Defined in:
- lib/oauth2/filtered_attributes.rb
Overview
Class-level helpers for configuring filtered attributes.
Class Method Summary collapse
-
.filtered_attribute_names(base) ⇒ Array<Symbol>
The configured attribute names to filter.
-
.filtered_attributes(base, *attributes) ⇒ void
Declare attributes that should be redacted in inspect output.
Instance Method Summary collapse
-
#filtered_attribute_names ⇒ Array<Symbol>
The configured attribute names to filter.
-
#filtered_attributes(*attributes) ⇒ void
Declare attributes that should be redacted in inspect output.
Class Method Details
.filtered_attribute_names(base) ⇒ Array<Symbol>
The configured attribute names to filter.
32 33 34 |
# File 'lib/oauth2/filtered_attributes.rb', line 32 def filtered_attribute_names(base) base.instance_variable_get(:@filtered_attribute_names) || [] end |
.filtered_attributes(base, *attributes) ⇒ void
This method returns an undefined value.
Declare attributes that should be redacted in inspect output.
24 25 26 |
# File 'lib/oauth2/filtered_attributes.rb', line 24 def filtered_attributes(base, *attributes) base.instance_variable_set(:@filtered_attribute_names, attributes.map(&:to_sym)) end |
Instance Method Details
#filtered_attribute_names ⇒ Array<Symbol>
The configured attribute names to filter.
48 49 50 |
# File 'lib/oauth2/filtered_attributes.rb', line 48 def filtered_attribute_names ClassMethods.filtered_attribute_names(self) end |
#filtered_attributes(*attributes) ⇒ void
This method returns an undefined value.
Declare attributes that should be redacted in inspect output.
41 42 43 |
# File 'lib/oauth2/filtered_attributes.rb', line 41 def filtered_attributes(*attributes) ClassMethods.filtered_attributes(self, *attributes) end |