<commit_before>module JSON
	module Generator
		class ObjectAttribute
			def initialize(attributes)
				@attributes = attributes
			end

			def generate
				return nil unless @attributes['required']
				return {} unless @attributes.has_key?('properties')
				@attributes['properties'].inject({}) do |json, (property_name, property_attributes)|
					json[property_name] = AttributeFactory.create(property_attributes).generate
					json
				end
			end
		end
	end
end<commit_msg>Refactored JSON::Generator::ObjectAttribute to inherit from BasicAttribute<commit_after>module JSON
	module Generator
		class ObjectAttribute < BasicAttribute
			def generate
				return nil unless required?
				return {} unless @attributes.has_key?('properties')
				@attributes['properties'].inject({}) do |json, (property_name, property_attributes)|
					json[property_name] = AttributeFactory.create(property_attributes).generate
					json
				end
			end
		end
	end
end
{'fraction_non_alphanumeric': 0.0897571277719113, 'fraction_numerical': 0.0, 'mean_word_length': 4.676646706586826, 'pattern_counts': {'":': 0, '<': 4, '<?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': '2962995', 'n_tokens_mistral': 306, 'n_tokens_neox': 245, 'n_words': 66}