Method: Fauxsql::AttributeWrapper#initialize

Defined in:
lib/fauxsql/attribute_wrapper.rb

#initialize(attribute, record, name, options) ⇒ AttributeWrapper

Returns a new instance of AttributeWrapper.

Raises:



14
15
16
17
18
# File 'lib/fauxsql/attribute_wrapper.rb', line 14

def initialize(attribute, record, name, options)
  raise MissingOptions if options.nil?
  @attribute, @record, @name, @options = attribute, record, name, options
  @record.fauxsql_attributes[name] ||= attribute
end