Method: Featuring::Serializable::Serializer#exclude

Defined in:
lib/featuring/serializable.rb

#exclude(*feature_flags) ⇒ Object

public

Exclude specific feature flags in the serialized result.

Examples:

module Features
  extend Featuring::Declarable

  feature :feature_1, true
  feature :feature_2, true
  feature :feature_3, true
end

Features.serialize do |serializer|
  serializer.exclude :feature_1, :feature_3
end
=> {
  feature_2: true
}


76
77
78
# File 'lib/featuring/serializable.rb', line 76

def exclude(*feature_flags)
  @excluded.concat(feature_flags)
end