Sha256: 3a885eaeb145ee4263b9c9072541766f306e3d4cd93467ae76c341350b5069b9

Contents?: true

Size: 612 Bytes

Versions: 1

Compression:

Stored size: 612 Bytes

Contents

require "protopuffs/message/base"
require "protopuffs/message/field"
require "protopuffs/message/wire_type"
require "protopuffs/parser/parser"


module Protopuffs
  class ParseError < StandardError; end

  def self.proto_load_path
    @proto_load_path ||= []
  end

  def self.proto_load_path=(paths)
    @proto_load_path = paths
  end

  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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chrisk-protopuffs-0.2.0 lib/protopuffs.rb