<commit_before>class Flagship::Dsl
  class InvalidOptionError < ::StandardError; end

  def initialize(key, context, base = nil, &block)
    @key = key
    @context = context
    @base = base
    @features = {}
    @definition = block
  end

  def enable(key, opts = {})
    opts = opts.dup
    condition = opts.delete(:if)

    if condition
      @features[key] = ::Flagship::Feature.new(key, condition, @context, opts)
    else
      @features[key] = ::Flagship::Feature.new(key, true, @context, opts)
    end
  end

  def disable(key, opts = {})
    raise InvalidOptionError.new("Option :if is not available for #disable") if opts[:if]

    @features[key] = ::Flagship::Feature.new(key, false, @context, opts)
  end

  def flagset
    instance_eval(&@definition)
    ::Flagship::Flagset.new(@key, @features, @base)
  end
end<commit_msg>Rename variables<commit_after>class Flagship::Dsl
  class InvalidOptionError < ::StandardError; end

  def initialize(key, context, base = nil, &block)
    @key = key
    @context = context
    @base = base
    @features = {}
    @definition = block
  end

  def enable(key, opts = {})
    tags = opts.dup
    condition = tags.delete(:if)

    if condition
      @features[key] = ::Flagship::Feature.new(key, condition, @context, tags)
    else
      @features[key] = ::Flagship::Feature.new(key, true, @context, tags)
    end
  end

  def disable(key, opts = {})
    raise InvalidOptionError.new("Option :if is not available for #disable") if opts[:if]

    @features[key] = ::Flagship::Feature.new(key, false, @context, opts)
  end

  def flagset
    instance_eval(&@definition)
    ::Flagship::Flagset.new(@key, @features, @base)
  end
end
{'fraction_non_alphanumeric': 0.1403926234384295, 'fraction_numerical': 0.0, 'mean_word_length': 3.4973262032085564, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4641580', 'n_tokens_mistral': 545, 'n_tokens_neox': 536, 'n_words': 142}