Sha256: c2d75ac3543ec87f380fa65a10e337b8801bb9aae6131e2ce8d098068ff6d0e5

Contents?: true

Size: 1.35 KB

Versions: 8

Compression:

Stored size: 1.35 KB

Contents

### Generated by rprotoc. DO NOT EDIT!
### <proto file: test/proto/addressbook_base.proto>
# package tutorial_ext;
# 
# message Person {
#   required string name = 1;
#   required int32 id = 2;
#   optional string email = 3;
# 
#   enum PhoneType {
#     MOBILE = 0;
#     HOME = 1;
#     WORK = 2;
#   }
# 
#   message PhoneNumber {
#     required string number = 1;
#     optional PhoneType type = 2 [default = HOME];
#   }
# 
#   repeated PhoneNumber phone = 4;
# 
#   extensions 100 to 200;
# }
# 
# message AddressBook {
#   repeated Person person = 1;
# }

require 'protobuf/message/message'
require 'protobuf/message/enum'
require 'protobuf/message/service'
require 'protobuf/message/extend'

module TutorialExt
  class Person < ::Protobuf::Message
    defined_in __FILE__
    required :string, :name, 1
    required :int32, :id, 2
    optional :string, :email, 3
    class PhoneType < ::Protobuf::Enum
      defined_in __FILE__
      MOBILE = value(:MOBILE, 0)
      HOME = value(:HOME, 1)
      WORK = value(:WORK, 2)
    end
    class PhoneNumber < ::Protobuf::Message
      defined_in __FILE__
      required :string, :number, 1
      optional :PhoneType, :type, 2, :default => :HOME
    end
    repeated :PhoneNumber, :phone, 4
    extensions 100..200
  end
  class AddressBook < ::Protobuf::Message
    defined_in __FILE__
    repeated :Person, :person, 1
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby_protobuf-0.4.11 test/proto/addressbook_base.pb.rb
ruby_protobuf-0.4.10 test/proto/addressbook_base.pb.rb
ruby_protobuf-0.4.9 test/proto/addressbook_base.pb.rb
ruby_protobuf-0.4.8 test/proto/addressbook_base.pb.rb
ruby_protobuf-0.4.7 test/proto/addressbook_base.pb.rb
ruby_protobuf-0.4.6 test/proto/addressbook_base.pb.rb
ruby_protobuf-0.4.5 test/proto/addressbook_base.pb.rb
ruby_protobuf-0.4.4 test/proto/addressbook_base.pb.rb