<commit_before>#
# Namespace for the Socializer engine
#
module Socializer
  # Decorators for {Socializer::Person}
  class PersonAddressDecorator < Draper::Decorator
    delegate_all

    # Define presentation-specific methods here. Helpers are accessed through
    # `helpers` (aka `h`). You can override attributes, for example:
    #
    #   def created_at
    #     helpers.content_tag :span, class: 'time' do
    #       object.created_at.strftime("%a %m/%d/%y")
    #     end
    #   end

    # Returns the formatted address
    #
    # @example
    #   282 <NAME>
    #   Imogeneborough, California 58517
    #   US
    #
    # @return [String]
    def formatted_address
      address = "#{model.line1} <br>"
      address << "#{model.line2} <br>" if model.line2?
      address << "#{city_province_or_state_postal_code} <br>"
      address << "#{model.country}"
    end

    # Returns the city, stat/province and postal code on one line
    #<commit_msg>add html_safe to formatted_address<commit_after>#
# Namespace for the Socializer engine
#
module Socializer
  # Decorators for {Socializer::Person}
  class PersonAddressDecorator < Draper::Decorator
    delegate_all

    # Define presentation-specific methods here. Helpers are accessed through
    # `helpers` (aka `h`). You can override attributes, for example:
    #
    #   def created_at
    #     helpers.content_tag :span, class: 'time' do
    #       object.created_at.strftime("%a %m/%d/%y")
    #     end
    #   end

    # Returns the formatted address
    #
    # @example
    #   282 <NAME>
    #   Imogeneborough, California 58517
    #   US
    #
    # @return [String]
    def formatted_address
      address = "#{model.line1} <br>"
      address << "#{model.line2} <br>" if model.line2?
      address << "#{city_province_or_state_postal_code} <br>"
      address << "#{model.country}"

      address.html_safe
    end

    # Returns the city, stat/province and postal code on one line
    #
{'fraction_non_alphanumeric': 0.11026422764227642, 'fraction_numerical': 0.011178861788617886, 'mean_word_length': 2.7080979284369113, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 11, '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': '6266971', 'n_tokens_mistral': 647, 'n_tokens_neox': 614, 'n_words': 168}