Module: Promiscuous::DSL
- Included in:
- Promiscuous
- Defined in:
- lib/promiscuous/dsl.rb
Defined Under Namespace
Classes: Definition
Instance Method Summary collapse
- #define(&block) ⇒ Object
- #publish(model, options = {}, &block) ⇒ Object
- #subscribe(model, options = {}, &block) ⇒ Object
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, ={}, &block) Definition.new(:publish, model, ).instance_eval(&block) end |
#subscribe(model, options = {}, &block) ⇒ Object
10 11 12 |
# File 'lib/promiscuous/dsl.rb', line 10 def subscribe(model, ={}, &block) Definition.new(:subscribe, model, ).instance_eval(&block) end |