Class: Interapp::Configuration
- Inherits:
-
Object
- Object
- Interapp::Configuration
- Defined in:
- lib/interapp/configuration.rb
Constant Summary collapse
- VALID_CONFIG_KEYS =
[:identifier, :private_key, :handler, :peers]
Instance Method Summary collapse
Instance Method Details
#add_peer {|peer| ... } ⇒ Object
11 12 13 14 15 16 |
# File 'lib/interapp/configuration.rb', line 11 def add_peer peer = Interapp::Peer.new yield(peer) @peers ||= [] @peers << peer end |
#on_receive(&block) ⇒ Object
7 8 9 |
# File 'lib/interapp/configuration.rb', line 7 def on_receive(&block) @handler = block end |