Module Her::Model::Attributes::ClassMethods
In: lib/her/model/attributes.rb

Methods

Public Instance methods

Create a mutex for dynamically generated attribute methods or use one defined by ActiveModel.

@private

Define the attributes that will be used to track dirty attributes and validations

@param [Array] attributes @example

  class User
    include Her::Model
    attributes :name, :email
  end

Define attribute method matchers to automatically define them using ActiveModel‘s define_attribute_methods.

@private

Initialize a collection of resources

@private

Initialize a single resource

@private

Initialize a collection of resources with raw data from an HTTP request

@param [Array] parsed_data @private

Initialize a new object with the "raw" parsed_data from the parsing middleware

@private

Define the accessor in which the API response metadata (obtained from the parsing middleware) will be stored

@param [Symbol] store_metadata

@example

  class User
    include Her::Model
    store_metadata :server_data
  end

Define the accessor in which the API response errors (obtained from the parsing middleware) will be stored

@param [Symbol] store_response_errors

@example

  class User
    include Her::Model
    store_response_errors :server_errors
  end

Use setter methods of model for each key / value pair in params Return key / value pairs for which no setter method was defined on the model

@private

[Validate]