Module: DataMapper::Chainable

Instance Method Summary collapse

Instance Method Details

#chainable(&block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



5
6
7
8
9
# File 'lib/dm-core/support/chainable.rb', line 5

def chainable(&block)
  mod = Module.new(&block)
  include mod
  mod
end

#extendable(&block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
15
16
# File 'lib/dm-core/support/chainable.rb', line 12

def extendable(&block)
  mod = Module.new(&block)
  extend mod
  mod
end