Sha256: fcf6e9b6c811c807e1a2afd1948654d10a18c22d58d030af4c43caf9d147ef20
Contents?: true
Size: 793 Bytes
Versions: 49
Compression:
Stored size: 793 Bytes
Contents
module Flipper module Api module V1 module Decorators class Actor < SimpleDelegator # Public: the actor and features. attr_reader :actor, :features def initialize(actor, features) @actor = actor @features = features end def as_json { 'flipper_id' => actor.flipper_id, 'features' => features_data, } end private def features_data features.each_with_object({}) do |feature, features_hash| features_hash[feature.name] = { 'enabled' => feature.enabled?(actor), } features_hash end end end end end end end
Version data entries
49 entries across 49 versions & 1 rubygems