Class: Manufactory::GenericModelAdapter

Inherits:
Adapter show all
Defined in:
lib/manufactory/adapters/generic_model.rb

Overview

ObjectAdapter.new(Object.new, *args)

Direct Known Subclasses

DataMapperAdapter

Instance Attribute Summary

Attributes inherited from Adapter

#callables, #klass, #name

Instance Method Summary collapse

Methods inherited from Adapter

#initialize, #run

Constructor Details

This class inherits a constructor from Manufactory::Adapter

Instance Method Details

#has_association?(object, attribute) ⇒ Boolean

tohle nechceme zdedit!



34
35
36
# File 'lib/manufactory/adapters/generic_model.rb', line 34

def has_association?(object, attribute) # tohle nechceme zdedit!
  false
end

#initialize_object(klass, default_attributes, attributes) ⇒ Object



30
31
32
# File 'lib/manufactory/adapters/generic_model.rb', line 30

def initialize_object(klass, default_attributes, attributes)
  klass.new(default_attributes.merge(attributes))
end