Skip to content

Commit

Permalink
reuse the Split Adapter provate method to return treatment type
Browse files Browse the repository at this point in the history
Co-authored-by: Desmond Sadler <[email protected]>
Co-authored-by: Si Cheng Zhou <[email protected]>
  • Loading branch information
3 people committed Oct 5, 2023
1 parent c8582a6 commit 0977e38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/this_feature/adapters/split_io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def off?(flag_name, context: EMPTY_CONTEXT, data: {}, record: nil)
treatment(flag_name, context: context, data: data, record: record).eql?('off')
end

def get_treatment(flag_name, record: nil)
client.get_treatment(record, flag_name)
def get_treatment(flag_name, context: EMPTY_CONTEXT, data: {}, record: nil)
treatment(flag_name, context: context, data: data, record: record)
end

private
Expand Down
2 changes: 1 addition & 1 deletion lib/this_feature/flag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def control?
end

def get_treatment
adapter.get_treatment(flag_name, record: record)
adapter.get_treatment(flag_name, context: context, data: data, record: record)
end
end
end

0 comments on commit 0977e38

Please sign in to comment.