Class: MessagePack::IDL::Generator
- Inherits:
-
Object
- Object
- MessagePack::IDL::Generator
show all
- Includes:
- ProcessorModule
- Defined in:
- lib/msgpack/idl/generator.rb
Constant Summary
collapse
- GENERATORS =
{}
Instance Attribute Summary
#log
Class Method Summary
collapse
Instance Method Summary
collapse
#log_error, #log_trace, #log_warn
Constructor Details
Returns a new instance of Generator.
40
41
|
# File 'lib/msgpack/idl/generator.rb', line 40
def initialize
end
|
Class Method Details
.available?(lang) ⇒ Boolean
43
44
45
|
# File 'lib/msgpack/idl/generator.rb', line 43
def self.available?(lang)
GENERATORS.has_key?(lang)
end
|
.register(lang, impl) ⇒ Object
36
37
38
|
# File 'lib/msgpack/idl/generator.rb', line 36
def self.register(lang, impl)
GENERATORS[lang.to_s] = impl
end
|
Instance Method Details
#generate(lang, ir, outdir) ⇒ Object
47
48
49
50
51
52
53
|
# File 'lib/msgpack/idl/generator.rb', line 47
def generate(lang, ir, outdir)
gen = GENERATORS[lang]
unless gen
raise IDLError, "generator not found: #{lang}"
end
gen.generate(ir, outdir)
end
|