Module: Blueprints::Extensions::Blueprintable

Includes:
Extendable
Included in:
Saveable, SoftSaveable
Defined in:
lib/blueprints/extensions.rb

Overview

Include this module into your class if you need klass.blueprint and object.blueprint methods.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from Extendable

included

Instance Method Details

#blueprint(attributes) ⇒ Object

Updates attributes of object by calling setter methods. Does same as update_attributes! except it also bypasses attr_protected and attr_accessible.

Parameters:

  • attributes (Hash)

    Attributes that are used to update object.



57
58
59
60
61
# File 'lib/blueprints/extensions.rb', line 57

def blueprint(attributes)
  attributes.each do |attribute, value|
    blueprint_attribute attribute, value
  end
end