Module: BlogRPC
- Defined in:
- lib/blogrpc.rb
Defined Under Namespace
Classes: BasicHandler, RackApp, SampleHandler
Constant Summary collapse
- VERSION =
"1.0.1"
Class Method Summary collapse
-
.generate_endpoint {|handler_class| ... } ⇒ Object
Generate an RPC Rack application and yield it’s only handler class to the passed block.
Class Method Details
.generate_endpoint {|handler_class| ... } ⇒ Object
Generate an RPC Rack application and yield it’s only handler class to the passed block. Call rpc(…) on the yielded class to define methods
6 7 8 9 10 |
# File 'lib/blogrpc.rb', line 6 def self.generate_endpoint(&blk) handler_class = Class.new(BlogRPC::BasicHandler) yield(handler_class) BlogRPC::RackApp.new(handler_class.new) end |