class Protobuf::Visitor::CreateDescriptorVisitor
def add_option(name, value)
def add_option(name, value) options = case current_descriptor when Google::Protobuf::FileDescriptorProto then Google::Protobuf::FileOptions.new when Google::Protobuf::DescriptorProto then Google::Protobuf::MessageOptions.new when Google::Protobuf::FieldDescriptorProto then Google::Protobuf::FieldOptions.new when Google::Protobuf::EnumDescriptorProto then Google::Protobuf::EnumOptions.new when Google::Protobuf::EnumValueDescriptorProto then Google::Protobuf::EnumValueOptions.new when Google::Protobuf::ServiceDescriptorProto then Google::Protobuf::ServiceOptions.new when Google::Protobuf::MethodDescriptorProto then Google::Protobuf::MethodOptions.new else raise ArgumentError, 'Invalid context' end #TODO how should options be handled? #current_descriptor.options << option end