<commit_before>module DataMapper
  module Resource
    include Extlib::Assertions
    extend Chainable

    def self.append_inclusions(*inclusions)
      warn "DataMapper::Resource.append_inclusions is deprecated, use DataMapper::Model.append_inclusions instead"
      Model.append_inclusions(*inclusions)
    end

    def self.extra_inclusions
      warn "DataMapper::Resource.extra_inclusions is deprecated, use DataMapper::Model.extra_inclusions instead"
      Model.extra_inclusions
    end

    def self.descendants
      warn "DataMapper::Resource.descendants is deprecated, use DataMapper::Model.descendants instead"
      DataMapper::Model.descendants
    end

    ##
    # Makes sure a class gets all the methods when it includes Resource
    #
    # @api private
    def self.included(model)
      model.extend Model
    end

    # Collection this resource associated with.
    # Used by SEL.
    #
    # @api private
    attr_writer :collection

    # @api public
    alias model class

    ##
    # Returns the value of the attribute.
    #
    # Do not read from instance variables directly, but use this method.
    # This method handles lazy loading the attribute and returning of
    # defaults if nessesary.
    #
    #   Class Foo
    #     include DataMapper::Resource
    #
    #     property :first_name, String
    #     property :last_name,  String
    #
    #     def full_name
    #       "#{attribute_get(:first_name)} #{attribute_get(:last_name)}"
    #     end
    #
    #     # using the shorter syntax
    #     def name_for_address_book<commit_msg>Use alias_method so Emacs' ruby-mode don't consider 'class' a new indentation level<commit_after>module DataMapper
  module Resource
    include Extlib::Assertions
    extend Chainable

    def self.append_inclusions(*inclusions)
      warn "DataMapper::Resource.append_inclusions is deprecated, use DataMapper::Model.append_inclusions instead"
      Model.append_inclusions(*inclusions)
    end

    def self.extra_inclusions
      warn "DataMapper::Resource.extra_inclusions is deprecated, use DataMapper::Model.extra_inclusions instead"
      Model.extra_inclusions
    end

    def self.descendants
      warn "DataMapper::Resource.descendants is deprecated, use DataMapper::Model.descendants instead"
      DataMapper::Model.descendants
    end

    ##
    # Makes sure a class gets all the methods when it includes Resource
    #
    # @api private
    def self.included(model)
      model.extend Model
    end

    # Collection this resource associated with.
    # Used by SEL.
    #
    # @api private
    attr_writer :collection

    # @api public
    alias_method :model, :class

    ##
    # Returns the value of the attribute.
    #
    # Do not read from instance variables directly, but use this method.
    # This method handles lazy loading the attribute and returning of
    # defaults if nessesary.
    #
    #   Class Foo
    #     include DataMapper::Resource
    #
    #     property :first_name, String
    #     property :last_name,  String
    #
    #     def full_name
    #       "#{attribute_get(:first_name)} #{attribute_get(:last_name)}"
    #     end
    #
    #     # using the shorter syntax
    #     def name_for_address_book
{'fraction_non_alphanumeric': 0.07103150092649783, 'fraction_numerical': 0.0, 'mean_word_length': 2.770663562281723, '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': '5360021', 'n_tokens_mistral': 917, 'n_tokens_neox': 880, 'n_words': 266}