module ActiveModel::AttributeReader
Constants
- VERSION
Public Class Methods
new(attributes = {})
click to toggle source
Calls superclass method
# File lib/active_model/attribute_reader.rb, line 8 def initialize(attributes = {}) if self.class.attribute_readers self.class.attribute_readers.each do |attribute| next if respond_to?(:"#{attribute}=") value = attributes.delete(attribute) instance_variable_set(:"@#{attribute}", value) end end super(attributes) end