Module: Titi::Adaptor::ClassMethods

Defined in:
lib/titi/adaptor.rb

Overview

The standard hack to construct class methods on a class that #include’s this model

Instance Method Summary collapse

Instance Method Details

#adapt(hsh = {}, &block) ⇒ Object

created an object and then adopts from the given hash and block



46
47
48
49
50
# File 'lib/titi/adaptor.rb', line 46

def adapt hsh={}, &block
  obj = self.new
  obj.adapt(hsh, &block)
  obj
end