Class: Marvin::DSL
- Inherits:
-
Object
- Object
- Marvin::DSL
- Defined in:
- lib/marvin/dsl.rb
Defined Under Namespace
Classes: Proxy
Instance Method Summary collapse
- #commands(&blk) ⇒ Object
- #configure(&blk) ⇒ Object
- #handler(&blk) ⇒ Object
-
#initialize(&blk) ⇒ DSL
constructor
A new instance of DSL.
- #logging(&blk) ⇒ Object
- #server(name, port = nil) ⇒ Object
Constructor Details
#initialize(&blk) ⇒ DSL
Returns a new instance of DSL.
45 46 47 |
# File 'lib/marvin/dsl.rb', line 45 def initialize(&blk) instance_eval(&blk) end |
Instance Method Details
#commands(&blk) ⇒ Object
57 58 59 |
# File 'lib/marvin/dsl.rb', line 57 def commands(&blk) call_prototype(:commands, &blk).register! end |
#configure(&blk) ⇒ Object
61 62 63 |
# File 'lib/marvin/dsl.rb', line 61 def configure(&blk) Marvin::Settings.client.configure(&blk) end |
#handler(&blk) ⇒ Object
53 54 55 |
# File 'lib/marvin/dsl.rb', line 53 def handler(&blk) call_prototype(:handler, &blk).register! end |
#logging(&blk) ⇒ Object
49 50 51 |
# File 'lib/marvin/dsl.rb', line 49 def logging(&blk) call_prototype(:logging, &blk).register! end |
#server(name, port = nil) ⇒ Object
65 66 67 |
# File 'lib/marvin/dsl.rb', line 65 def server(name, port = nil) name = name.to_s.dup end |