Module: Promiscuous::DSL

Included in:
Promiscuous
Defined in:
lib/promiscuous/dsl.rb

Defined Under Namespace

Classes: Definition

Instance Method Summary collapse

Instance Method Details

#define(&block) ⇒ Object



2
3
4
# File 'lib/promiscuous/dsl.rb', line 2

def define(&block)
  instance_eval(&block)
end

#publish(model, options = {}, &block) ⇒ Object



6
7
8
# File 'lib/promiscuous/dsl.rb', line 6

def publish(model, options={}, &block)
  Definition.new(:publish, model, options).instance_eval(&block)
end

#subscribe(model, options = {}, &block) ⇒ Object



10
11
12
# File 'lib/promiscuous/dsl.rb', line 10

def subscribe(model, options={}, &block)
  Definition.new(:subscribe, model, options).instance_eval(&block)
end