<commit_before># json_config_attributes

Simple ActiveSupport::Concern for converting a JSON config string into
methods available for read.

## Install
  gem 'json_config_attributes'
  bundle

## Usage

```ruby
class Activity < ActiveRecord::Base
  include JsonConfigAttributes
  json_config_attributes :config_json,
    :name
end

# name is now available as an accessor
a = Activity.new(:config_json => '{ "name" : "activity name" }'
a.config_json
=> "activity name"<commit_msg>Fixed typo in documentation<commit_after># json_config_attributes

Simple ActiveSupport::Concern for converting a JSON config string into
methods available for read.

## Install
  gem 'json_config_attributes'
  bundle

## Usage

```ruby
class Activity < ActiveRecord::Base
  include JsonConfigAttributes
  json_config_attributes :config_json,
    :name
end

# name is now available as an accessor
a = Activity.new(:config_json => '{ "name" : "activity name" }')
a.name
=> "activity name"
{'fraction_non_alphanumeric': 0.09006211180124224, 'fraction_numerical': 0.0, 'mean_word_length': 5.3618421052631575, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1807284', 'n_tokens_mistral': 287, 'n_tokens_neox': 276, 'n_words': 92}