<commit_before>module Cieloz
  module Helpers
    module ClassMethods
      def hattr_writer *attrs
        attrs.each { |attr|
          define_method "#{attr}=" do |value|
            value = eval(attr.to_s.constantize).new(value) if value.is_a? Hash
            instance_variable_set "@#{attr}", value
            yield(value) if block_given?<commit_msg>Fixes 'wrong constant name dados_ec' error when passing dados_ec RequisicaoTransacao constructor<commit_after>module Cieloz
  module Helpers
    module ClassMethods
      def hattr_writer *attrs
        attrs.each { |attr|
          define_method "#{attr}=" do |value|
            if value.is_a? Hash
              name = attr.to_s.camelize
              cls = self.class.const_get name
              value = cls.new(value)
            end
            instance_variable_set "@#{attr}", value
            yield(value) if block_given?
{'fraction_non_alphanumeric': 0.08548931383577053, 'fraction_numerical': 0.0, 'mean_word_length': 2.284132841328413, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5356615', 'n_tokens_mistral': 258, 'n_tokens_neox': 257, 'n_words': 67}