Class: PostHog::FeatureFlagMetadata Private

Inherits:
Object
  • Object
show all
Defined in:
lib/posthog/feature_flag.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Represents metadata about a feature flag.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FeatureFlagMetadata

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of FeatureFlagMetadata.

Parameters:

  • json (Hash)

    Raw metadata returned by /flags.



74
75
76
77
78
79
80
# File 'lib/posthog/feature_flag.rb', line 74

def initialize(json)
  json.transform_keys!(&:to_s)
  @id = json['id']
  @version = json['version']
  @payload = json['payload']
  @description = json['description']
end

Instance Attribute Details

#descriptionObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



71
72
73
# File 'lib/posthog/feature_flag.rb', line 71

def description
  @description
end

#idObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



71
72
73
# File 'lib/posthog/feature_flag.rb', line 71

def id
  @id
end

#payloadObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



71
72
73
# File 'lib/posthog/feature_flag.rb', line 71

def payload
  @payload
end

#versionObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



71
72
73
# File 'lib/posthog/feature_flag.rb', line 71

def version
  @version
end