<commit_before>module Gnoibox
  class Block < ActiveRecord::Base
    include ColumnHoldable

    self.table_name= :gnoibox_blocks

    validates :key, presence: true, uniqueness: true

    def to_param() self.class.key end

    def label() self.class.label end

    class << self
      attr_reader :key, :label
      def set_key(key, label)
        Gnoibox::BlockCollection.add self
        @key = key.to_sym
        @label = label
      end

      def to_param()
        key
      end

      def substance
        find_or_create_by(key: key)
      end

      def content
        substance.content
      end

    end
  end
end
<commit_msg>Block.content_hash<commit_after>module Gnoibox
  class Block < ActiveRecord::Base
    include ColumnHoldable

    self.table_name= :gnoibox_blocks

    validates :key, presence: true, uniqueness: true

    def to_param() self.class.key end

    def label() self.class.label end

    class << self
      attr_reader :key, :label
      def set_key(key, label)
        Gnoibox::BlockCollection.add self
        @key = key.to_sym
        @label = label
      end

      def to_param()
        key
      end

      def substance
        find_or_create_by(key: key)
      end

      def content
        substance.content
      end
      
      def content_hash
        substance.content_hash
      end

    end
  end
end

{'fraction_non_alphanumeric': 0.06646971935007386, 'fraction_numerical': 0.0, 'mean_word_length': 1.997787610619469, 'pattern_counts': {'":': 0, '<': 9, '<?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': '1433040', 'n_tokens_mistral': 431, 'n_tokens_neox': 411, 'n_words': 112}