Module: Eson::Chainable

Included in:
API
Defined in:
lib/eson/chainable.rb

Instance Method Summary collapse

Instance Method Details

#chainable(&block) ⇒ Object



7
8
9
10
11
# File 'lib/eson/chainable.rb', line 7

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

#extendable(&block) ⇒ Object



14
15
16
17
18
# File 'lib/eson/chainable.rb', line 14

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