Module: Protopuffs
- Defined in:
- lib/protopuffs.rb,
lib/protopuffs/message/base.rb,
lib/protopuffs/message/field.rb,
lib/protopuffs/parser/parser.rb,
lib/protopuffs/message/wire_type.rb
Defined Under Namespace
Modules: Message, Parser
Classes: Bool, Bytes, Double, Embedded, Fixed32, Fixed32Base, Fixed64, Fixed64Base, Float, Int32, Int64, LengthDelimited, MessageField, Numeric, ParseError, SFixed32, String, UInt32, UInt64, VarInt, WireType
Class Method Summary
collapse
Class Method Details
.load_message_classes ⇒ Object
22
23
24
25
26
27
28
29
30
|
# File 'lib/protopuffs.rb', line 22
def self.load_message_classes
parser = Protopuffs::Parser::ProtocolBufferDescriptor.new
@proto_load_path.each do |path|
Dir.glob(File.join(path, "**/*.proto")) do |descriptor_path|
parser.parse(File.read(descriptor_path))
end
end
end
|
.proto_load_path ⇒ Object
14
15
16
|
# File 'lib/protopuffs.rb', line 14
def self.proto_load_path
@proto_load_path ||= []
end
|
.proto_load_path=(paths) ⇒ Object
18
19
20
|
# File 'lib/protopuffs.rb', line 18
def self.proto_load_path=(paths)
@proto_load_path = paths
end
|