Class: WorkOS::FlagRuleUpdatedContextPreviousAttribute

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/feature_flags/flag_rule_updated_context_previous_attribute.rb

Constant Summary collapse

HASH_ATTRS =
{
  data: :data,
  context: :context
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ FlagRuleUpdatedContextPreviousAttribute

Returns a new instance of FlagRuleUpdatedContextPreviousAttribute.



16
17
18
19
20
# File 'lib/workos/feature_flags/flag_rule_updated_context_previous_attribute.rb', line 16

def initialize(json)
  hash = self.class.normalize(json)
  @data = hash[:data] ? WorkOS::FlagRuleUpdatedContextPreviousAttributeData.new(hash[:data]) : nil
  @context = hash[:context] ? WorkOS::FlagRuleUpdatedContextPreviousAttributeContext.new(hash[:context]) : nil
end

Instance Attribute Details

#contextObject

Returns the value of attribute context.



12
13
14
# File 'lib/workos/feature_flags/flag_rule_updated_context_previous_attribute.rb', line 12

def context
  @context
end

#dataObject

Returns the value of attribute data.



12
13
14
# File 'lib/workos/feature_flags/flag_rule_updated_context_previous_attribute.rb', line 12

def data
  @data
end