Class: PostHog::FeatureFlagMetadata

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

Overview

Represents metadata about a feature flag

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FeatureFlagMetadata

Returns a new instance of FeatureFlagMetadata.



59
60
61
62
63
64
65
# File 'lib/posthog/feature_flag.rb', line 59

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)

Returns the value of attribute description.



57
58
59
# File 'lib/posthog/feature_flag.rb', line 57

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



57
58
59
# File 'lib/posthog/feature_flag.rb', line 57

def id
  @id
end

#payloadObject (readonly)

Returns the value of attribute payload.



57
58
59
# File 'lib/posthog/feature_flag.rb', line 57

def payload
  @payload
end

#versionObject (readonly)

Returns the value of attribute version.



57
58
59
# File 'lib/posthog/feature_flag.rb', line 57

def version
  @version
end