begin_namespace(f_service_, ruby_modules(tservice->get_program()));
- indent(f_service_) << "module " << tservice->get_name() << endl;
+ indent(f_service_) << "module " << capitalize(tservice->get_name()) << endl;
indent_up();
// Generate the three main parts of the service (well, two for now in PHP)
module ThriftBenchmark
module BenchmarkService
class Client
- include Thrift::Client
+ include ::Thrift::Client
def fibonacci(n)
send_fibonacci(n)
end
class Processor
- include Thrift::Processor
+ include ::Thrift::Processor
def process_fibonacci(seqid, iprot, oprot)
args = read_args(iprot, Fibonacci_args)
# HELPER FUNCTIONS AND STRUCTURES
class Fibonacci_args
- include Thrift::Struct
+ include ::Thrift::Struct
N = 1
Thrift::Struct.field_accessor self, :n
end
class Fibonacci_result
- include Thrift::Struct
+ include ::Thrift::Struct
SUCCESS = 0
Thrift::Struct.field_accessor self, :success
module SpecNamespace
module NonblockingService
class Client
- include Thrift::Client
+ include ::Thrift::Client
def greeting(english)
send_greeting(english)
end
class Processor
- include Thrift::Processor
+ include ::Thrift::Processor
def process_greeting(seqid, iprot, oprot)
args = read_args(iprot, Greeting_args)
# HELPER FUNCTIONS AND STRUCTURES
class Greeting_args
- include Thrift::Struct
+ include ::Thrift::Struct
ENGLISH = 1
Thrift::Struct.field_accessor self, :english
end
class Greeting_result
- include Thrift::Struct
+ include ::Thrift::Struct
SUCCESS = 0
Thrift::Struct.field_accessor self, :success
end
class Block_args
- include Thrift::Struct
+ include ::Thrift::Struct
FIELDS = {
end
class Block_result
- include Thrift::Struct
+ include ::Thrift::Struct
SUCCESS = 0
Thrift::Struct.field_accessor self, :success
end
class Unblock_args
- include Thrift::Struct
+ include ::Thrift::Struct
N = 1
Thrift::Struct.field_accessor self, :n
end
class Unblock_result
- include Thrift::Struct
+ include ::Thrift::Struct
FIELDS = {
end
class Shutdown_args
- include Thrift::Struct
+ include ::Thrift::Struct
FIELDS = {
end
class Shutdown_result
- include Thrift::Struct
+ include ::Thrift::Struct
FIELDS = {
end
class Sleep_args
- include Thrift::Struct
+ include ::Thrift::Struct
SECONDS = 1
Thrift::Struct.field_accessor self, :seconds
end
class Sleep_result
- include Thrift::Struct
+ include ::Thrift::Struct
FIELDS = {
module SpecNamespace
class Hello
- include Thrift::Struct
+ include ::Thrift::Struct
GREETING = 1
Thrift::Struct.field_accessor self, :greeting
end
class Foo
- include Thrift::Struct
+ include ::Thrift::Struct
SIMPLE = 1
WORDS = 2
HELLO = 3
end
class BoolStruct
- include Thrift::Struct
+ include ::Thrift::Struct
YESNO = 1
Thrift::Struct.field_accessor self, :yesno
end
class SimpleList
- include Thrift::Struct
+ include ::Thrift::Struct
BOOLS = 1
BYTES = 2
I16S = 3
end
class Xception < Thrift::Exception
- include Thrift::Struct
+ include ::Thrift::Struct
MESSAGE = 1
CODE = 2